> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# Update an integration

PATCH https://api.jelliu.co/api/integrations/{integrationId}
Content-Type: application/json

Changes only the fields present in the body. `credentials` replaces the stored credentials
wholesale (no merge) and does **not** re-run the connection test — call
`POST /api/integrations/{integrationId}/test` afterwards. `fieldMapping` replaces the whole
mapping. `campaignId: null` unlinks the campaign. `status` accepts only `active` and `paused`;
`error` and `pending_auth` are set by Jelliu. An empty body is accepted and only bumps `updated_at`.

**Side effects.** Encrypts new credentials; clears the integration caches; writes an audit entry
(action `update`, resource `integration`, credentials redacted). Pausing an OAuth integration
also takes it out of the background token-refresh scan.

**Idempotency.** Safe to retry: sending the same body again yields the same stored values.

**Webhook events.** `audit.log_recorded` for webhooks subscribed to it. See [Webhooks](/webhooks).

**Access**

* **Required scope:** `full`. Humans need the `admin` or `owner` role.
* **Rate limit:** General API (120–600 requests/min per workspace by plan) plus the configuration-mutation limiter — 10 requests/min per workspace. See [Rate limits](/rate-limits).
* **Plan:** Available on every plan.

Reference: https://developer.jelliu.co/api-reference/integrations/patch-integrations-by-integration-id

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Path parameters

- `integrationId` (string, required) — Integration to update. A value that is not a UUID is rejected with `400`.

### Body (application/json)

This endpoint expects an object.

- `label` (string, optional) — New display name.
- `credentials` (map from string to any, optional) — Replacement credentials. Encrypted at rest and never returned.
- `fieldMapping` (map from string to string, optional) — Replacement mapping, source field → Jelliu contact field. Salesforce keys must be valid field identifiers.
- `campaignId` (string, optional, nullable) — Campaign that inbound contacts go to; `null` unlinks it.
- `status` (enum, optional) — `paused` — stop background token refresh for the integration and mark it inactive (features that require `active`, such as the Kommo agent CRM tools, refuse to run). `active` — resume it.
  - Allowed values: `active`, `paused`

## Response

### 200

The updated integration.

- `data` (object, required) — The full integration record returned by retrieve, create and update: every `Integration` field plus the columns below. `credentials` is still masked; OAuth tokens appear only as encrypted ciphertext.
  - `id` (string, optional) — Unique identifier.
  - `tenant_id` (string, optional) — Workspace that owns the integration.
  - `provider` (enum, optional) — External system. One live integration per provider per workspace. Only `webhook` has a built-in adapter; the CRM values remain for OAuth connections (Kommo powers the agent CRM tools) and for integrations created before CRMs moved to the app catalogue. Integrations created through the OAuth flow can also carry `calcom`.
    - Allowed values: `hubspot`, `salesforce`, `zoho`, `pipedrive`, `freshsales`, `airtable`, `google_sheets`, `webhook`, `dynamics365`, `zendesk`, `servicenow`, `kommo`, `monday`, `bitrix24`, `intercom`, `notion`
  - `label` (string, optional, nullable) — Display name, or `null`.
  - `auth_method` (enum, optional) — How Jelliu authenticates to the provider: `credentials` (JSON supplied at creation, the default), `oauth2` (tokens from the OAuth flow) or `api_key`.
    - Allowed values: `credentials`, `oauth2`, `api_key`
  - `status` (enum, optional) — Connection state: `active`, `paused` (set by you), `error` (the last test or token refresh failed — see `last_error`) or `pending_auth` (not verified yet, or the provider permanently rejected the refresh token and the user must reconnect). Only `active` and `paused` can be set with `PATCH`.
    - Allowed values: `active`, `paused`, `error`, `pending_auth`
  - `credentials` (string, optional) — Always the literal `***`. Stored credentials are never returned.
  - `contact_count` (integer, optional) — Contacts imported through this integration's inbound webhook so far.
  - `last_synced_at` (datetime, optional, nullable) — Last time the inbound webhook received a payload, or `null`.
  - `last_error` (string, optional, nullable) — Reason for the last failure, shown next to `status` `error`; `null` once a test or refresh succeeds. May be provider or product text in Spanish.
  - `field_mapping` (map from string to any, optional) — Source field name → Jelliu contact field (`phoneNumber`, `email`, `whatsappNumber`, `name`). `{}` when unset.
  - `campaign_id` (string, optional, nullable) — Campaign that inbound contacts are added to, or `null`.
  - `oauth_expires_at` (datetime, optional, nullable) — When the current OAuth access token expires; `null` for non-OAuth or non-expiring tokens.
  - `oauth_scopes` (string, optional, nullable) — Scopes granted by the provider, as the single string the provider returned, or `null`.
  - `inbound_webhook_uuid` (string, optional) — Opaque id of the inbound URL `/webhooks/integrations/v2/{inbound_webhook_uuid}`. Every integration has one; only `webhook` integrations accept pushes on it.
  - `created_at` (datetime, optional) — When the integration was created.
  - `updated_at` (datetime, optional) — Last change to the record, including status and sync updates.
  - `deleted_at` (datetime, optional, nullable) — Always `null` in responses; deleted integrations are not returned.
  - `webhook_secret` (string, optional, nullable) — Shared secret a sender must put in the `x-webhook-secret` header when pushing to a `webhook` integration. Returned in plaintext. No endpoint in this API sets it; while it is `null` every push is answered `401`.
  - `external_account_id` (string, optional, nullable) — The provider's own account id (for example a HubSpot portal id), set by the OAuth callback. One provider account can be connected to only one workspace.
  - `sync_cursor` (string, optional, nullable) — Provider pagination cursor from the retired pull sync. Normally `null`.
  - `ticketing_config` (map from string to any, optional, nullable) — Ticketing settings for helpdesk providers, or `null`.
  - `oauth_metadata` (map from string to any, optional, nullable) — Provider data captured by the OAuth callback: `subdomain` (Zendesk, ServiceNow, Kommo), `instance_url` (Salesforce), `api_domain` (Pipedrive), `scopes_verified` (whether the provider reported granted scopes) and `missing_scopes` (requested scopes it did not grant). `null` for non-OAuth integrations.
  - `oauth_access_token` (string, optional, nullable) — Current OAuth access token as encrypted ciphertext (unusable outside Jelliu), or `null`. Wiped on delete.
  - `oauth_refresh_token` (string, optional, nullable) — OAuth refresh token as encrypted ciphertext, or `null`. Wiped on delete.
  - `discovered_schema` (map from string to any, optional, nullable) — Schema inferred from the first payload a `webhook` integration received (same shape as `GET /api/integrations/{integrationId}/webhook-schema`), or `null`.

## Errors

### 400 Bad Request Error

Body or path failed validation, or a Salesforce mapping key is invalid.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

The key is not `full`, the user is not an admin or owner, or the workspace is suspended.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 404 Not Found Error

The integration does not exist, was deleted, or belongs to another workspace.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

General API limit or the 10/min configuration-mutation limit exceeded.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

### Integrations_patchIntegrationsByIntegrationId_example

**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "id": "c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71",
    "tenant_id": "8a41c7e2-3b5d-4f09-a6e1-7d2c9b0f4e58",
    "provider": "webhook",
    "label": "Formulario web",
    "auth_method": "credentials",
    "status": "paused",
    "credentials": "***",
    "contact_count": 412,
    "last_synced_at": "2026-09-14T22:03:51.000Z",
    "last_error": null,
    "field_mapping": {
      "correo": "email",
      "nombre": "name",
      "telefono": "phoneNumber"
    },
    "campaign_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
    "oauth_expires_at": null,
    "oauth_scopes": null,
    "inbound_webhook_uuid": "e04f7b3a-91c2-4d58-a3e6-1f8b2c9d7a05",
    "created_at": "2026-08-19T16:45:02.000Z",
    "updated_at": "2026-09-15T13:40:18.000Z",
    "deleted_at": null,
    "webhook_secret": null,
    "external_account_id": null,
    "sync_cursor": null,
    "ticketing_config": {},
    "oauth_metadata": {},
    "oauth_access_token": null,
    "oauth_refresh_token": null,
    "discovered_schema": {
      "entityType": "contact",
      "fields": [
        {
          "confidence": 0.9,
          "name": "telefono",
          "sample": "+573001234567",
          "type": "phone"
        }
      ],
      "suggestedMapping": {
        "telefono": "phoneNumber"
      }
    }
  }
}
```

**SDK Code**

```python Integrations_patchIntegrationsByIntegrationId_example
import requests

url = "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Integrations_patchIntegrationsByIntegrationId_example
const url = 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Integrations_patchIntegrationsByIntegrationId_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Integrations_patchIntegrationsByIntegrationId_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Integrations_patchIntegrationsByIntegrationId_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Integrations_patchIntegrationsByIntegrationId_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Integrations_patchIntegrationsByIntegrationId_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Integrations_patchIntegrationsByIntegrationId_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Pause

**Request**

```json
{
  "status": "paused"
}
```

**Response**

```json
{
  "data": {
    "id": "c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71",
    "tenant_id": "8a41c7e2-3b5d-4f09-a6e1-7d2c9b0f4e58",
    "provider": "webhook",
    "label": "Formulario web",
    "auth_method": "credentials",
    "status": "paused",
    "credentials": "***",
    "contact_count": 412,
    "last_synced_at": "2026-09-14T22:03:51.000Z",
    "last_error": null,
    "field_mapping": {
      "correo": "email",
      "nombre": "name",
      "telefono": "phoneNumber"
    },
    "campaign_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
    "oauth_expires_at": null,
    "oauth_scopes": null,
    "inbound_webhook_uuid": "e04f7b3a-91c2-4d58-a3e6-1f8b2c9d7a05",
    "created_at": "2026-08-19T16:45:02.000Z",
    "updated_at": "2026-09-15T13:40:18.000Z",
    "deleted_at": null,
    "webhook_secret": null,
    "external_account_id": null,
    "sync_cursor": null,
    "ticketing_config": {},
    "oauth_metadata": {},
    "oauth_access_token": null,
    "oauth_refresh_token": null,
    "discovered_schema": {
      "entityType": "contact",
      "fields": [
        {
          "confidence": 0.9,
          "name": "telefono",
          "sample": "+573001234567",
          "type": "phone"
        }
      ],
      "suggestedMapping": {
        "telefono": "phoneNumber"
      }
    }
  }
}
```

**SDK Code**

```python Pause
import requests

url = "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

payload = { "status": "paused" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Pause
const url = 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"status":"paused"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Pause
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

	payload := strings.NewReader("{\n  \"status\": \"paused\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Pause
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"status\": \"paused\"\n}"

response = http.request(request)
puts response.read_body
```

```java Pause
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"status\": \"paused\"\n}")
  .asString();
```

```php Pause
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71', [
  'body' => '{
  "status": "paused"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Pause
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"status\": \"paused\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pause
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["status": "paused"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Change mapping and campaign

**Request**

```json
{
  "label": "Formulario landing septiembre",
  "fieldMapping": {
    "email": "email",
    "full_name": "name",
    "phone": "phoneNumber"
  },
  "campaignId": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"
}
```

**Response**

```json
{
  "data": {
    "id": "c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71",
    "tenant_id": "8a41c7e2-3b5d-4f09-a6e1-7d2c9b0f4e58",
    "provider": "webhook",
    "label": "Formulario web",
    "auth_method": "credentials",
    "status": "paused",
    "credentials": "***",
    "contact_count": 412,
    "last_synced_at": "2026-09-14T22:03:51.000Z",
    "last_error": null,
    "field_mapping": {
      "correo": "email",
      "nombre": "name",
      "telefono": "phoneNumber"
    },
    "campaign_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
    "oauth_expires_at": null,
    "oauth_scopes": null,
    "inbound_webhook_uuid": "e04f7b3a-91c2-4d58-a3e6-1f8b2c9d7a05",
    "created_at": "2026-08-19T16:45:02.000Z",
    "updated_at": "2026-09-15T13:40:18.000Z",
    "deleted_at": null,
    "webhook_secret": null,
    "external_account_id": null,
    "sync_cursor": null,
    "ticketing_config": {},
    "oauth_metadata": {},
    "oauth_access_token": null,
    "oauth_refresh_token": null,
    "discovered_schema": {
      "entityType": "contact",
      "fields": [
        {
          "confidence": 0.9,
          "name": "telefono",
          "sample": "+573001234567",
          "type": "phone"
        }
      ],
      "suggestedMapping": {
        "telefono": "phoneNumber"
      }
    }
  }
}
```

**SDK Code**

```python Change mapping and campaign
import requests

url = "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

payload = {
    "label": "Formulario landing septiembre",
    "fieldMapping": {
        "email": "email",
        "full_name": "name",
        "phone": "phoneNumber"
    },
    "campaignId": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Change mapping and campaign
const url = 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"label":"Formulario landing septiembre","fieldMapping":{"email":"email","full_name":"name","phone":"phoneNumber"},"campaignId":"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Change mapping and campaign
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71"

	payload := strings.NewReader("{\n  \"label\": \"Formulario landing septiembre\",\n  \"fieldMapping\": {\n    \"email\": \"email\",\n    \"full_name\": \"name\",\n    \"phone\": \"phoneNumber\"\n  },\n  \"campaignId\": \"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Change mapping and campaign
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"label\": \"Formulario landing septiembre\",\n  \"fieldMapping\": {\n    \"email\": \"email\",\n    \"full_name\": \"name\",\n    \"phone\": \"phoneNumber\"\n  },\n  \"campaignId\": \"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d\"\n}"

response = http.request(request)
puts response.read_body
```

```java Change mapping and campaign
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"label\": \"Formulario landing septiembre\",\n  \"fieldMapping\": {\n    \"email\": \"email\",\n    \"full_name\": \"name\",\n    \"phone\": \"phoneNumber\"\n  },\n  \"campaignId\": \"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d\"\n}")
  .asString();
```

```php Change mapping and campaign
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71', [
  'body' => '{
  "label": "Formulario landing septiembre",
  "fieldMapping": {
    "email": "email",
    "full_name": "name",
    "phone": "phoneNumber"
  },
  "campaignId": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Change mapping and campaign
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"label\": \"Formulario landing septiembre\",\n  \"fieldMapping\": {\n    \"email\": \"email\",\n    \"full_name\": \"name\",\n    \"phone\": \"phoneNumber\"\n  },\n  \"campaignId\": \"7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Change mapping and campaign
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "label": "Formulario landing septiembre",
  "fieldMapping": [
    "email": "email",
    "full_name": "name",
    "phone": "phoneNumber"
  ],
  "campaignId": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/integrations/c71e4a09-2f8b-4d63-8e15-b90d3a6c2f71")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```