Skip to main content
PUT
/
addresses
/
{id}
cURL
curl --request PUT \
  --url https://api.useanima.sh/v1/addresses/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "label": "<string>",
  "street1": "<string>",
  "street2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postalCode": "<string>",
  "country": "<string>",
  "isPrimary": true
}
'
{
  "id": "<string>",
  "agentId": "<string>",
  "orgId": "<string>",
  "label": "<string>",
  "street1": "<string>",
  "street2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postalCode": "<string>",
  "country": "<string>",
  "validated": true,
  "validatedAt": "2023-11-07T05:31:56Z",
  "provider": "<string>",
  "metadata": {},
  "isPrimary": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

id
string
required

Address identity identifier

Body

application/json

Input for updating an existing address identity

agentId
required

Agent identifier that owns this address

Pattern: ^[0-9a-z]+$
type
enum<string>

Updated address type

Available options:
BILLING,
SHIPPING,
MAILING,
REGISTERED
label
string

Updated label

street1
string

Updated primary street address line

Minimum string length: 1
street2
string

Updated secondary street address line

city
string

Updated city name

Minimum string length: 1
state
string

Updated state or province

Minimum string length: 1
postalCode
string

Updated postal or ZIP code

Minimum string length: 1
country
string

Updated 2-character ISO 3166-1 alpha-2 country code

Required string length: 2
Pattern: ^[A-Z]{2}$
isPrimary
boolean

Set as primary address for this type

Response

200 - application/json

OK

Full address identity record

id
string
required

Unique address identity identifier

agentId
string
required

Agent that owns this address

orgId
string
required

Organization the address belongs to

type
enum<string>
required

Address type

Available options:
BILLING,
SHIPPING,
MAILING,
REGISTERED
label
string | null
required

User-defined label

street1
string
required

Primary street address line

street2
string | null
required

Secondary street address line

city
string
required

City name

state
string
required

State or province

postalCode
string
required

Postal or ZIP code

country
string
required

2-character ISO country code

validated
boolean
required

Whether the address has been validated

validatedAt
string<date-time> | null
required

Timestamp when the address was validated

provider
string | null
required

Validation provider name

metadata
object | null
required

Additional metadata

isPrimary
boolean
required

Whether this is the primary address for its type

createdAt
string<date-time>
required

Timestamp when the address was created

updatedAt
string<date-time>
required

Timestamp when the address was last updated