For AI agents: the complete documentation index is available at https://docs.clickmax.io/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.io/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.io/en/features/contacts/publish-to-your-own-api.md.
  • English
  • How do I send an object's records to my system's API?

    Create an HTTP integration: you describe your system's API (ERP, website, another CRM) and it becomes a destination like the portals. Clickmax sends each published record, retries when the API fails and records every send in the record's history.

    Before you start

    • Permission to configure objects (Custom objects → Configure).
    • A text field on the object with each item's code. You choose it in Item code, in the Map fields step, and it is how your API knows which item to update.
    • An https API that creates or updates the item at the same address (for example, PUT /items/{code}), so a resend never creates a duplicate item.

    1. Where to send

    1. In CRM → Settings → CRM settings → Objects, open the object and click the Integrations tab.
    2. Click Add integration and, under Custom integrations, Build a custom integration.
    3. In the Where to send step, give it a Name (it shows on the integration's card).
    4. In Publish address, choose the method and paste the URL of your API that creates or updates an item. The URL must use {{itemKey}} (or {{externalId}}): click Insert item code to add it at the end.
    5. If your API asks for a key or token, click Add header under Authentication (for example, Authorization) and mark Secret. The value isn't stored in the integration: it's asked when connecting the account and never shows on screen or in the history.
    6. Click Next. If something is missing, the error shows under the field.

    2. What to send

    Add a field for each piece of information the API receives:

    • Name on screen: what shows in the mapping. The key used in the API is generated from it (Sale price becomes sale_price); to use another one, click the key next to Sent to the API as.
    • Type: Text, Long text, Number, Yes/No, Date, Image or file, or Option list.
    • Required: the destination is only ready to connect when this field has a source in the mapping.
    • Multiple values: the field takes a list (several photos, several options).
    • Accepted options (Option list only): one per line, as value=Label, for example 1020=Apartment. The value is what goes to the API.

    3. Review

    The Review step shows the publish request as it will be sent. The JSON body is built from the fields, each with its own key; click Edit body if your API needs another format (and Back to the automatic body to undo). Use the markers:

    MarkerWhat goes in
    {{itemKey}}The record's item code.
    {{externalId}}The id your API returned on the previous send (without an id path in the response, it is the item code itself).
    {{field.<key>}}The mapped value of that field.

    In a JSON body, a marker alone between quotes keeps the field's type: "price": "{{field.price}}" sends a number, a list goes as a list and an empty field goes as null.

    Advanced options holds the settings that rarely change:

    • Take down: by default, DELETE on the publish address, with {{externalId}} instead of {{itemKey}}, and the same authentication. If you change it, the address must use {{externalId}}.
    • URL parameters for each request.
    • Reading the response: dotted paths in the JSON the API returns, for example data.id. Item id at the destination and Item link show on the record and in the history; Error list, Error field and Error message put each rejection on the right field of the record.
    • Response timeout (10 seconds by default) and Description.

    The result of each send follows the response's HTTP code:

    ResponseOn the sheet
    2xxLive
    400 or 422Rejected, with the errors per field
    401 or 403The account goes With error and the send, Paused
    408, 429 or 5xx, or no responseRetrying, with growing intervals

    On removal, 404 also counts as taken down.

    4. Save and map

    1. Click Save integration. The wizard moves on to Map fields.
    2. In Item code, choose the field with the code (if the object already publishes to another destination, it comes filled in).
    3. Map the object to the fields you declared and click Save mapping (see how to publish an object's records). The wizard moves on to Connect account.

    5. Connect the account

    In the Connect account step, name the account, fill in the Secret values and click Connect. From then on, publish from the record's sheet as with any destination.

    If you close the wizard before that, the mapping is saved and the integration only shows on the tab once the account is connected. To pick up, choose the integration again in Add integration or in the tab's list of platforms.

    6. Test with a record

    1. On the integration's card, click Edit integration.
    2. Under Test with a record, pick a record and click Build request. The screen shows the request exactly as it would be sent, with secret values masked, without calling your API.

    Archive the integration only works with no connected account: disconnect the accounts first.