PUT
/
projects
/
{projectIdOrName}
/
integrations
/
{integrationId}
/
object-metadata
curl --request PUT \
--url https://api.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/object-metadata \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"fields": {
"Account": [
{
"fieldName": "Industry",
"displayName": "Industry Sector",
"description": "The industry this account operates in",
"valueType": "string",
"required": false,
"stringOptions": {
"length": 255,
"defaultValue": "Technology"
}
},
{
"fieldName": "Company_Size",
"displayName": "Company Size",
"valueType": "string",
"stringOptions": {
"values": [
"Small",
"Medium",
"Large",
"Enterprise"
],
"valuesRestricted": true
}
}
],
"Contact": [
{
"fieldName": "Seniority_Level",
"displayName": "Seniority Level",
"valueType": "string",
"stringOptions": {
"values": [
"Junior",
"Mid",
"Senior",
"Executive"
],
"valuesRestricted": true
}
}
]
}
}'
{
  "success": true,
  "fields": {}
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

integrationId
string
required

The integration ID.

Query Parameters

groupRef
string
required

The groupRef for the installation

Body

application/json

Metadata upsert request containing field definitions to create or update

Request payload for upserting metadata (fields only)

fields
object
required

Maps object names to field definitions

Response

Metadata creation completed successfully

Response containing results for all created/updated fields

success
boolean
required

Indicates if the upsert operation was successful

fields
object
required

Maps object name -> field name -> upsert result