Update a contact

PATCH /api/v1/contacts/{contactId} Updates the identity of a contact. Only two fields are accepted: A field you do not send is left untouched.
The status is not editable here. A status sent in the body is ignored — it never changes the subscription state. Use /unsubscribe and /resubscribe, which are explicit acts.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERRefused — 403
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Request body

FieldTypeRequiredDescription
firstNamestringnoUp to 100 characters, null clears it
lastNamestringnoUp to 100 characters, null clears it

Example

bash
curl -X PATCH -H "x-api-key: $AGENTMAIL_API_KEY" -H "content-type: application/json" \
  -d '{"firstName":"Camille","lastName":"Dubois"}' \
  "https://www.agentsmail.io/api/v1/contacts/$CONTACT_ID"

Response

  • 200 OK — the call succeeded.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 403 Forbidden — the key's owner is a member of the organization, not an admin.
  • 404 Not Found — no such resource, or it belongs to another organization. The API never confirms that an id exists to a caller who has no right to it.
  • 429 Too Many Requests — over 120 requests in a minute for this key.

Response fields

FieldTypeDescription
successbooleanIndicates if the operation was successful
data.idstringUnique identifier for the contact
data.emailstringIts address — unique inside its list
data.firstNamestringnull
data.lastNamestringnull
data.statusstringpending, subscribed, unsubscribed, bounced, complained
data.listIdstringThe list it belongs to
data.listobject{id, name} of that list
data.tagsarray{id, name} of every tag carried
data.createdAtstringISO creation date
data.updatedAtstringISO date of the last change

Example response

json
{
  "success": true,
  "data": {
    "id": "4d19c0a2",
    "email": "ada@example.com",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "status": "subscribed",
    "listId": "0b7c51e8",
    "list": {
      "id": "0b7c51e8",
      "name": "Newsletter"
    },
    "tags": [
      {
        "id": "7c2ef4b1",
        "name": "vip"
      }
    ],
    "createdAt": "2026-08-23T10:22:05.000Z",
    "updatedAt": "2026-08-23T10:22:05.000Z"
  }
}