Set user field mapping
Say where one Corma user field takes its value from. A field has one source at a time, so this replaces whatever was configured before rather than adding to it. A configured field cannot return to the connector defaults.
curl -X PUT "https://api.corma.io/v1/user-fields/{id}/mapping" \
-H "x-corma-api-key: $CORMA_OPEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "source",
"connectorId": "string",
"expression": "string"
}'Authorization
x-corma-api-keystringheaderrequiredColon-separated API key ID and secret:
API_KEY_ID:API_KEY_SECRET
Parameters
idstringpathrequiredThe identifier of the user field, as
GET /user-fieldsreturned it.x-corma-idempotency-keystringheaderOptional client-generated key. Reusing the same key with an identical request replays the original response instead of enqueueing a duplicate task.
Body
Response
OK
idstringrequiredThe identifier of the field —
jobTitlefor a standard field,custom.<key>for one the workspace defined. The manager is one field,manager.labelstringrequiredThe name of the field, as Corma displays it.
descriptionstring | nullrequiredOne sentence that says what the field holds. Null for a field the workspace defined.
typeenum<string>requiredThe type of value the field holds.
One of:stringnumberbooleandatestring[]object[]useroriginenum<string>requiredWhether Corma defines the field or the workspace does.
One of:standardcustominboundMappablebooleanrequiredWhether a connector may feed this field. False for the professional email, which matches a person across connectors, and for the fields Corma computes from another one.
defaultSourcesstring[]requiredThe connected connectors that write this field in the
defaultmode. Empty when no connector declares a default for it.mappingany ofrequiredWhere the field takes its value from.
{
"id": "string",
"label": "string",
"description": "string",
"type": "string",
"origin": "standard",
"inboundMappable": true,
"defaultSources": [
"string"
],
"mapping": {
"mode": "default"
}
}