# Connect link for Apple

```http
POST https://api.synup.com/api/v4/connected-accounts/connect-apple
```

Generates an Apple Business Connect OAuth link for a **single location**. Redirect the user to the returned `url` to authorize the connection; on completion Apple redirects back to your `successUrl` (or `errorUrl` on failure). The link is valid for 1 day.

**Apple OAuth link variants:**
- **Connect link for Apple** — connects a single location (this endpoint; takes a `locationId`).
- **Bulk connect link for Apple** — connects multiple locations in one flow (account/platform-scoped; no `locationId`).
- **Renew connect link for Apple** — re-authorizes an expired or revoked token for an existing connection.

Source: https://developer.synup.com/api/connected-accounts/connect-link-for-apple

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Synup-Version` | string | required | API version date (YYYY-MM-DD). |

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `input` | object | required |  |
| `input.locationId` | string | required | Relay-encoded location ID to connect. |
| `input.successUrl` | string | required | Redirect URL on successful authorization. |
| `input.errorUrl` | string | required | Redirect URL on failed authorization. |
| `input.clientMutationId` | string | optional |  |

## Example request

```bash
curl -X POST 'https://api.synup.com/api/v4/connected-accounts/connect-apple' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "locationId": "TG9jYXRpb246MQ==",
    "successUrl": "https://app.synup.com/apple/success",
    "errorUrl": "https://app.synup.com/apple/error"
  }
}'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized - Invalid or missing API key |
