addContact
Requires a customer (portal or buyer app) session.
Add a person to the buyer's account.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation AddContact($input: AddMobileContactInput!) {
addContact(input: $input) {
id
name
title
firstName
lastName
department
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation AddContact($input: AddMobileContactInput!) {\n addContact(input: $input) {\n id\n name\n title\n firstName\n lastName\n department\n }\n}",
"variables": {
"input": {}
}
}
EOF
Variables:
{
"input": {}
}
Response:
{
"data": {
"addContact": {
"id": "id",
"name": "string",
"title": "string",
"firstName": "string",
"lastName": "string",
"department": "string"
}
}
}
addContact(
input: AddMobileContactInput!
): MobileContact!
Arguments
addContact.input ● AddMobileContactInput! non-null input
The details of the mobile contact to add.
Type
MobileContact object
A person on the buyer's account (name + optional title/email/phone).