---
updatedAt: 2026-11-10T17:49:36.000Z
agentTools:
  projectIndex: https://developers.activecampaign.com/llms.txt
---

# Update an association

Changes a link. Send only the fields to change; the others keep their values. Changing `account` moves the contact to that account. Saving a link also sets the contact's account (`orgid` and `orgname` on the contact) and can start automations that run when a contact's account changes. Changing `contact` does not clear `orgid` and `orgname` on the contact that was linked before. Needs permission to edit contacts. PATCH /accountContacts/{id} does the same thing.

Please note that we currently allow single account per contact.

```json PUT /accountContacts/:id (Example REQUEST)
{
	"accountContact": {
		"jobTitle": "Product Manager"
	}
}
```
```json PUT /accountContacts/:id (Example RESPONSE)
{
    "accountContact": {
        "account": "3",
        "contact": "2",
        "jobTitle": "CEO",
        "createdTimestamp": "2019-06-26T11:26:15-05:00",
        "updatedTimestamp": "2019-06-26T11:29:57-05:00",
        "links": {
            "account": "http://hosted.localdev/api/3/accountContacts/19/account",
            "contact": "http://hosted.localdev/api/3/accountContacts/19/contact"
        },
        "id": "19"
    }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "v3",
    "version": "3"
  },
  "servers": [
    {
      "url": "https://{youraccountname}.api-us1.com/api/3",
      "variables": {
        "youraccountname": {
          "default": "youraccountname"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Api-Token",
        "in": "header",
        "x-default": ""
      }
    },
    "schemas": {
      "AccountContactHttpError": {
        "properties": {
          "errors": {
            "description": "One entry describing the error.",
            "type": "array",
            "items": {
              "properties": {
                "status": {
                  "description": "The HTTP status code.",
                  "type": "integer"
                },
                "title": {
                  "description": "The HTTP status text, such as Forbidden.",
                  "type": "string"
                },
                "detail": {
                  "description": "What went wrong.",
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "type": "object"
      },
      "AccountContactValidationErrors": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "description": "One entry for each problem found.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "What is wrong, in English."
                },
                "detail": {
                  "type": "string",
                  "description": "Always empty here."
                },
                "code": {
                  "type": "string",
                  "description": "field_missing when account or contact was not sent, related_missing when no account or contact has that id, field_invalid for the other problems."
                },
                "error": {
                  "type": "string",
                  "description": "A machine-readable code for a missing or unknown account or contact, such as accountContact_account_was_not_provided or account_not_exist. Empty for the other problems."
                },
                "source": {
                  "description": "Where the problem is.",
                  "type": "object",
                  "properties": {
                    "pointer": {
                      "type": "string",
                      "description": "The field the problem is about: /data/attributes/account, /data/attributes/contact, or /data/attributes/account,contact for the pair."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SideloadedAccounts": {
        "type": "array",
        "description": "The linked account, as returned by the accounts API (its fields are documented under GET /accounts/{id}).",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "description": "ID of the account.",
              "type": "string",
              "examples": [
                "2"
              ]
            },
            "name": {
              "description": "The account's name.",
              "type": "string",
              "examples": [
                "Example Account"
              ]
            },
            "accountUrl": {
              "description": "The account's website URL. Null when none is set.",
              "type": [
                "string",
                "null"
              ],
              "examples": [
                "https://www.example.com"
              ]
            },
            "owner": {
              "description": "ID of the user who owns the account. Null when it has no owner.",
              "type": [
                "string",
                "null"
              ],
              "examples": [
                "1"
              ]
            },
            "contactCount": {
              "description": "How many contacts are associated with the account.",
              "type": "string",
              "examples": [
                "1"
              ]
            },
            "dealCount": {
              "description": "How many deals the account has.",
              "type": "string",
              "examples": [
                "0"
              ]
            },
            "createdTimestamp": {
              "description": "When the account was created, in ISO 8601 format.",
              "type": "string",
              "examples": [
                "2019-05-15T15:58:16-05:00"
              ]
            },
            "updatedTimestamp": {
              "description": "When the account was last changed, in ISO 8601 format.",
              "type": "string",
              "examples": [
                "2019-05-15T15:58:16-05:00"
              ]
            },
            "links": {
              "description": "URLs of the account's related records.",
              "type": "object",
              "properties": {
                "notes": {
                  "type": "string"
                },
                "accountCustomFieldData": {
                  "type": "string"
                },
                "accountContacts": {
                  "type": "string"
                },
                "emailActivities": {
                  "type": "string"
                },
                "contactEmails": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accountContacts/{id}": {
      "put": {
        "summary": "Update an association",
        "description": "Changes a link. Send only the fields to change; the others keep their values. Changing `account` moves the contact to that account. Saving a link also sets the contact's account (`orgid` and `orgname` on the contact) and can start automations that run when a contact's account changes. Changing `contact` does not clear `orgid` and `orgname` on the contact that was linked before. Needs permission to edit contacts. PATCH /accountContacts/{id} does the same thing.",
        "operationId": "update-an-association-1",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the link.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountContact": {
                    "description": "The fields to change.",
                    "properties": {
                      "account": {
                        "type": "integer",
                        "description": "ID of an existing account to move the contact to.",
                        "format": "int32"
                      },
                      "contact": {
                        "type": "integer",
                        "description": "ID of an existing contact that is not linked to a different account.",
                        "format": "int32"
                      },
                      "jobTitle": {
                        "type": "string",
                        "description": "The contact's job title at the account."
                      }
                    },
                    "type": "object"
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "accountContact": {
                      "jobTitle": "Product Manager"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The link was changed. `accounts` holds the linked account.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"accounts\": [\n        {\n            \"name\": \"Example Inc\",\n            \"accountUrl\": \"https://www.example.com\",\n            \"createdTimestamp\": \"2019-05-15T15:58:16-05:00\",\n            \"updatedTimestamp\": \"2019-06-26T10:49:10-05:00\",\n            \"owner\": \"1\",\n            \"links\": {\n                \"notes\": \"https://example.api-us1.com/api/3/accounts/3/notes\",\n                \"accountCustomFieldData\": \"https://example.api-us1.com/api/3/accounts/3/accountCustomFieldData\",\n                \"accountContacts\": \"https://example.api-us1.com/api/3/accounts/3/accountContacts\",\n                \"emailActivities\": \"https://example.api-us1.com/api/3/accounts/3/emailActivities\",\n                \"contactEmails\": \"https://example.api-us1.com/api/3/accounts/3/contactEmails\",\n                \"owner\": \"https://example.api-us1.com/api/3/accounts/3/owner\"\n            },\n            \"id\": \"3\"\n        }\n    ],\n    \"accountContact\": {\n        \"account\": \"3\",\n        \"contact\": \"2\",\n        \"jobTitle\": \"CEO\",\n        \"createdTimestamp\": \"2019-06-26T11:26:15-05:00\",\n        \"updatedTimestamp\": \"2019-06-26T11:29:57-05:00\",\n        \"links\": {\n            \"account\": \"https://:account.api-us1.com/api/3/accountContacts/19/account\",\n            \"contact\": \"https://:account.api-us1.com/api/3/accountContacts/19/contact\"\n        },\n        \"id\": \"19\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountContact": {
                      "description": "The changed link.",
                      "type": "object",
                      "properties": {
                        "account": {
                          "description": "ID of the account. Returned as it was sent, so it may be a number or a string.",
                          "type": [
                            "integer",
                            "string"
                          ],
                          "example": "3"
                        },
                        "contact": {
                          "description": "ID of the contact. Returned as it was sent, so it may be a number or a string.",
                          "type": [
                            "integer",
                            "string"
                          ],
                          "example": "2"
                        },
                        "jobTitle": {
                          "description": "The contact's job title at the account: the value sent, or the stored value (which may be null) when jobTitle was not sent.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "CEO"
                        },
                        "createdTimestamp": {
                          "description": "When the link was created, in ISO 8601 format.",
                          "type": "string",
                          "example": "2019-06-26T11:26:15-05:00"
                        },
                        "updatedTimestamp": {
                          "description": "When the link was last changed, in ISO 8601 format.",
                          "type": "string",
                          "example": "2019-06-26T11:29:57-05:00"
                        },
                        "links": {
                          "description": "URLs of the linked records.",
                          "type": "object",
                          "properties": {
                            "account": {
                              "description": "URL that returns the account.",
                              "type": "string",
                              "example": "https://:account.api-us1.com/api/3/accountContacts/19/account"
                            },
                            "contact": {
                              "description": "URL that returns the contact.",
                              "type": "string",
                              "example": "https://:account.api-us1.com/api/3/accountContacts/19/contact"
                            }
                          }
                        },
                        "id": {
                          "description": "ID of the link.",
                          "type": "string",
                          "example": "19"
                        }
                      }
                    },
                    "accounts": {
                      "$ref": "#/components/schemas/SideloadedAccounts"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The body is a non-empty JSON list or a non-empty single value instead of an object. This is checked before anything else. An empty body is read as an empty object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountContactHttpError"
                },
                "example": {
                  "errors": [
                    {
                      "status": 400,
                      "title": "Bad Request",
                      "detail": "Request body must be a JSON object, array given."
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks permission to edit contacts. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountContactHttpError"
                },
                "example": {
                  "errors": [
                    {
                      "status": 403,
                      "title": "Forbidden",
                      "detail": "Forbidden"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No link has this id.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"No Result found for CustomerAccountSubscriber with id 100\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "description": "Says that no link has this id.",
                      "type": "string",
                      "example": "No Result found for CustomerAccountSubscriber with id 100"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The changed link failed validation. Nothing was saved. Possible problems: `account` or `contact` was set to an empty value or to an id that does not exist; or `contact` was changed to a contact already linked to a different account, or already linked to this account (which gives both errors).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountContactValidationErrors"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```