# Save domain registrant

Save the company and contact details used to register domains for the workspace.

POST https://api.brigg.app/v1/operations/domains.SaveDomainRegistrant

## Access & visibility

Allow `domains.SaveDomainRegistrant` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | string | Yes | The registered company name, exactly as the register spells it. At most 255 characters. |
| `org_number` | string | Yes | Organisation number from the company register, stored as text to preserve leading zeros. At most 32 characters. |
| `name` | string | Yes | The contact person. At most 255 characters. |
| `address_line` | string | Yes | Street address of the domain registrant. At most 255 characters. |
| `postal_code` | string | Yes | Postal code as text, preserving leading zeros. At most 16 characters. |
| `city` | string | Yes | Postal town or city. At most 255 characters. |
| `country` | string | Yes | ISO 3166-1 alpha-2. At most 2 characters. |
| `email` | string | Yes | Email address. At most 255 characters. |
| `phone` | string | Yes | With country code (+47 …). At most 32 characters. |

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `registrant` | [object (2 variants)](#savedomainregistrantregistrant-response-registrant) | Yes | Company and contact details used for domain registration. |
| `saved` | boolean | Yes | Whether the registrant details were saved. |
| `registrar_error` | string | No | Present when the record saved but the registrar mirror failed; the purchase re-mirrors. |

### SaveDomainRegistrantRegistrant · response.registrant

#### Variant 1

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `org_id` | string | Yes | Org identifier. |
| `organization` | string | Yes | Legal organization registering the domain. |
| `org_number` | string | Yes | Organisation number from the company register, stored as text to preserve leading zeros. |
| `name` | string | Yes | Display name. |
| `address_line` | string | Yes | Street address of the domain registrant. |
| `postal_code` | string | Yes | Postal code as text, preserving leading zeros. |
| `city` | string | Yes | Postal town or city. |
| `country` | string | Yes | Country associated with the address or record. |
| `email` | string | Yes | Email address. |
| `phone` | string | Yes | Phone number including its country calling code. |

#### Variant 2

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `org_id` | string | Yes | Org identifier. |
| `organization` | string | Yes | Legal organization registering the domain. |
| `org_number` | string | Yes | Organisation number from the company register, stored as text to preserve leading zeros. |
| `name` | string | Yes | Display name. |
| `address_line` | string | Yes | Street address of the domain registrant. |
| `postal_code` | string | Yes | Postal code as text, preserving leading zeros. |
| `city` | string | Yes | Postal town or city. |
| `country` | string | Yes | Country associated with the address or record. |
| `email` | string | Yes | Email address. |
| `phone` | string | Yes | Phone number including its country calling code. |

## Errors & retries

Set `BRIGG_REQUEST_ID` once for each logical action. The samples send it as `Idempotency-Key`. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. Reuse the original Idempotency-Key. |

## Next steps

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/domains.SaveDomainRegistrant' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "organization": "Northstar Consulting AS",
  "org_number": "999999999",
  "name": "Alex Morgan",
  "address_line": "Example street 10",
  "postal_code": "0150",
  "city": "Oslo",
  "country": "NO",
  "email": "alex@example.com",
  "phone": "+4799999999"
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/domains.SaveDomainRegistrant", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "organization": "Northstar Consulting AS",
    "org_number": "999999999",
    "name": "Alex Morgan",
    "address_line": "Example street 10",
    "postal_code": "0150",
    "city": "Oslo",
    "country": "NO",
    "email": "alex@example.com",
    "phone": "+4799999999"
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "organization": "Northstar Consulting AS",
  "org_number": "999999999",
  "name": "Alex Morgan",
  "address_line": "Example street 10",
  "postal_code": "0150",
  "city": "Oslo",
  "country": "NO",
  "email": "alex@example.com",
  "phone": "+4799999999"
}
request = Request(
    "https://api.brigg.app/v1/operations/domains.SaveDomainRegistrant",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "registrant": {
    "org_id": "o_example",
    "organization": "Northstar Consulting AS",
    "org_number": "999999999",
    "name": "Alex Morgan",
    "address_line": "Example street 10",
    "postal_code": "0150",
    "city": "Oslo",
    "country": "NO",
    "email": "alex@example.com",
    "phone": "+4799999999"
  },
  "saved": true
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "maxLength": 255,
      "description": "The registered company name, exactly as the register spells it."
    },
    "org_number": {
      "type": "string",
      "maxLength": 32,
      "description": "Organisation number from the company register, stored as text to preserve leading zeros."
    },
    "name": {
      "type": "string",
      "maxLength": 255,
      "description": "The contact person."
    },
    "address_line": {
      "type": "string",
      "maxLength": 255,
      "description": "Street address of the domain registrant."
    },
    "postal_code": {
      "type": "string",
      "maxLength": 16,
      "description": "Postal code as text, preserving leading zeros."
    },
    "city": {
      "type": "string",
      "maxLength": 255,
      "description": "Postal town or city."
    },
    "country": {
      "type": "string",
      "maxLength": 2,
      "description": "ISO 3166-1 alpha-2."
    },
    "email": {
      "type": "string",
      "maxLength": 255,
      "description": "Email address."
    },
    "phone": {
      "type": "string",
      "maxLength": 32,
      "description": "With country code (+47 …)."
    }
  },
  "required": [
    "organization",
    "org_number",
    "name",
    "address_line",
    "postal_code",
    "city",
    "country",
    "email",
    "phone"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "organization": "Northstar Consulting AS",
      "org_number": "999999999",
      "name": "Alex Morgan",
      "address_line": "Example street 10",
      "postal_code": "0150",
      "city": "Oslo",
      "country": "NO",
      "email": "alex@example.com",
      "phone": "+4799999999"
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "registrant": {
      "description": "Company and contact details used for domain registration.",
      "title": "SaveDomainRegistrantRegistrant",
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "string",
              "description": "Org identifier."
            },
            "organization": {
              "type": "string",
              "description": "Legal organization registering the domain."
            },
            "org_number": {
              "type": "string",
              "description": "Organisation number from the company register, stored as text to preserve leading zeros."
            },
            "name": {
              "type": "string",
              "description": "Display name."
            },
            "address_line": {
              "type": "string",
              "description": "Street address of the domain registrant."
            },
            "postal_code": {
              "type": "string",
              "description": "Postal code as text, preserving leading zeros."
            },
            "city": {
              "type": "string",
              "description": "Postal town or city."
            },
            "country": {
              "type": "string",
              "description": "Country associated with the address or record."
            },
            "email": {
              "type": "string",
              "description": "Email address."
            },
            "phone": {
              "type": "string",
              "description": "Phone number including its country calling code."
            }
          },
          "required": [
            "org_id",
            "organization",
            "org_number",
            "name",
            "address_line",
            "postal_code",
            "city",
            "country",
            "email",
            "phone"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "org_id": {
              "type": "string",
              "description": "Org identifier."
            },
            "organization": {
              "type": "string",
              "description": "Legal organization registering the domain."
            },
            "org_number": {
              "type": "string",
              "description": "Organisation number from the company register, stored as text to preserve leading zeros."
            },
            "name": {
              "type": "string",
              "description": "Display name."
            },
            "address_line": {
              "type": "string",
              "description": "Street address of the domain registrant."
            },
            "postal_code": {
              "type": "string",
              "description": "Postal code as text, preserving leading zeros."
            },
            "city": {
              "type": "string",
              "description": "Postal town or city."
            },
            "country": {
              "type": "string",
              "description": "Country associated with the address or record."
            },
            "email": {
              "type": "string",
              "description": "Email address."
            },
            "phone": {
              "type": "string",
              "description": "Phone number including its country calling code."
            }
          },
          "required": [
            "org_id",
            "organization",
            "org_number",
            "name",
            "address_line",
            "postal_code",
            "city",
            "country",
            "email",
            "phone"
          ],
          "additionalProperties": false
        }
      ]
    },
    "saved": {
      "type": "boolean",
      "description": "Whether the registrant details were saved."
    },
    "registrar_error": {
      "type": "string",
      "description": "Present when the record saved but the registrar mirror failed; the purchase re-mirrors."
    }
  },
  "required": [
    "registrant",
    "saved"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "registrant": {
        "org_id": "o_example",
        "organization": "Northstar Consulting AS",
        "org_number": "999999999",
        "name": "Alex Morgan",
        "address_line": "Example street 10",
        "postal_code": "0150",
        "city": "Oslo",
        "country": "NO",
        "email": "alex@example.com",
        "phone": "+4799999999"
      },
      "saved": true
    }
  ]
}
```

