Skip to main content
PATCH
/
companies
/
v2
/
rs
/
{companyId}
/
contacts
/
{contactId}
Update a contact
curl --request PATCH \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/companies/v2/rs/{companyId}/contacts/{contactId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>' \
  --data '
{
  "notify": true,
  "name": "Company Contact Name",
  "email": "[email protected]",
  "phones": [
    "phone1",
    "phone2"
  ],
  "comment": "Company contact comment"
}
'
{
  "id": 1,
  "name": "Company Contact Name",
  "email": "[email protected]",
  "phones": [
    "phone1",
    "phone2"
  ],
  "comment": "Company contact comment",
  "companyId": 1,
  "notifyAt": "2024-12-05T14:56:23.000Z",
  "updatedAt": "2024-12-05T14:56:23.000Z",
  "createdAt": "2024-01-15T08:45:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Session-Token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json

Path Parameters

contactId
integer
required

Unique identifier of the company contact.

Example:

1

companyId
integer
required

Identifier of the associated company.

Example:

1

Body

application/json
notify
boolean
required

Indicates whether the company contact should be notified.

Example:

true

name
string

Name of the company contact.

Maximum string length: 250
Example:

"Company Contact Name"

email
string<email> | null

Email of the company contact.

Maximum string length: 250
phones
string[]

Phones of the company contact.

Maximum array length: 5
Maximum string length: 50
Example:
["phone1", "phone2"]
comment
string | null

Comment on the company contact.

Maximum string length: 2500
Example:

"Company contact comment"

Response

200 - application/json

Contacts updated successfully

id
integer
required

Unique identifier of the company contact.

Example:

1

name
string
required

Name of the company contact.

Maximum string length: 250
Example:

"Company Contact Name"

email
string<email> | null
required

Email of the company contact.

Maximum string length: 250
phones
string[]
required

Phones of the company contact.

Maximum array length: 5
Maximum string length: 50
Example:
["phone1", "phone2"]
comment
string | null
required

Comment on the company contact.

Maximum string length: 2500
Example:

"Company contact comment"

companyId
integer
required

Identifier of the associated company.

Example:

1

notifyAt
required

Date of the next notification of the company contact.

Example:

"2024-12-05T14:56:23.000Z"

updatedAt
required

Date of the last update of the company contact.

Example:

"2024-12-05T14:56:23.000Z"

createdAt
required

Date of company contact creation.

Example:

"2024-01-15T08:45:00.000Z"