Customers

Create a contact of a customer

Changed on

Create a contact of a customer. Contacts are a separate resource: creating one does not add its email address to the invoice recipients of the customer.

ℹ️ This endpoint requires the following scope: customers:all

post/api/external/v2/customers/{customer_id}/contacts

Request

  • Base URL
    https://app.pennylane.com
  • URL
    https://app.pennylane.com/api/external/v2/customers/{customer_id}/contacts
  • Auth
    OAuth 2
    Authorization code: https://app.pennylane.com/oauth/authorize
    Token URL: https://app.pennylane.com/oauth/oauth/token scopes: customers:all

Path parameters

customer_idinteger required

Headers

X-Company-Idstring
Example:12345

Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.

Request body

first_namestring required
last_namestring required
rolestring

Role of the contact within the customer organization.

emailstring email required
telephone_numberstring

Landline number of the contact.

mobile_numberstring

Mobile number of the contact.

Example request

{
  "first_name": "Jane",
  "last_name": "Doe",
  "role": "accountant",
  "email": "jane.doe@example.com",
  "telephone_number": "+33123456789",
  "mobile_number": "+33612345678"
}

Response

Returns the created contact

idinteger required
first_namestring required
last_namestring required
rolestring required
emailstring required
telephone_numberstring required
mobile_numberstring required
created_atstring date-time required
updated_atstring date-time required

Example response

{
  "id": 421,
  "first_name": "Jane",
  "last_name": "Doe",
  "role": "accountant",
  "email": "jane.doe@example.com",
  "created_at": "2023-08-30T10:08:08.146343Z",
  "updated_at": "2023-08-30T10:08:08.146343Z"
}

Changes