POST
/
projects
/
{projectIdOrName}
/
integrations
/
{integrationId}
/
objects
/
{objectName}
Write records
curl --request POST \
  --url https://write.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/objects/{objectName} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "groupRef": "<string>",
  "type": "create",
  "mode": "synchronous",
  "retryPolicy": {
    "deadlineHours": 24
  },
  "record": {
    "email": "david@withampersand.com",
    "warmthScore": "ready-for-close"
  },
  "associations": [
    {
      "to": {
        "id": "18417469260"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 279
        }
      ]
    }
  ]
}'
{
  "result": {
    "success": true,
    "data": {
      "email": "david@ampersand.com"
    },
    "recordId": "003Dp0X#@RG7IAP"
  },
  "operationId": "acb0d75a-1b59-4aad-a191-48c5b75ea9e4"
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required
integrationId
string
required
objectName
string
required

Body

application/json

Write request

groupRef
string
required

The ID of the user group whose SaaS instance you'd like to write data to. This is the ID that was provided during installation creation.

type
enum<string>
required

The type of write operation. The only supported types currently are create and update.

Available options:
create,
update
Example:

"create"

mode
enum<string>

The mode of write operation. The only supported mode currently is synchronous.

Available options:
synchronous,
asynchronous
Example:

"synchronous"

retryPolicy
object

The retry policy for an asynchronous write operation.

record
object

The record to write

Example:
{
"email": "david@withampersand.com",
"warmthScore": "ready-for-close"
}
associations
object[]

To write associations to the record. Note: currently only HubSpot associations are supported

Example:
[
{
"to": { "id": "18417469260" },
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 279
}
]
}
]

Response

The success response

operationId
string
required

The operation ID

Example:

"acb0d75a-1b59-4aad-a191-48c5b75ea9e4"

result
object

The result of the write operation. Only present for synchronous operations.