> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/api-reference/organizations/verify-an-email-domain-of-an-organization.md).

# Verify an email domain of an organization

Checks the domain's DNS TXT record. A legacy domain first gets its verification record, and keeps letting people join until it is verified.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organizations","description":"The Organizations API provides a robust way to handle the administrative structure of your GitBook workspace. By creating and configuring organizations, you can group multiple users, spaces, and collections, simplifying your permission management and fostering efficient collaboration for teams of any size.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"Organization\" grouped=\"false\" %}\n    The Organization object\n{% endopenapi-schemas %}\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user-internal":[]}],"components":{"securitySchemes":{"user-internal":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"$ref":"#/components/schemas/EntityId"}},"emailDomain":{"name":"emailDomain","in":"path","required":true,"description":"Email domain","schema":{"type":"string"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"OrganizationDomain":{"type":"object","description":"An email domain of an organization.","properties":{"object":{"type":"string","description":"The object type, which is always \"organization-domain\"","enum":["organization-domain"]},"domain":{"type":"string","description":"The email domain, such as \"example.com\""},"status":{"$ref":"#/components/schemas/OrganizationDomainStatus"},"statusDescription":{"type":"string","description":"Why the last verification failed"},"verificationRecord":{"type":"object","description":"DNS TXT record to add to the domain to verify it","properties":{"type":{"type":"string","enum":["TXT"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"]},"autoJoinEnabled":{"type":"boolean","description":"Whether people with an email on the domain join the organization automatically"},"defaultRole":{"$ref":"#/components/schemas/OrganizationDomainDefaultRole"},"defaultTeam":{"type":"string","description":"ID of the team that people joining through the domain are added to"},"verifiedAt":{"description":"Date the domain was verified","$ref":"#/components/schemas/Timestamp"},"createdAt":{"description":"Date the domain was added","$ref":"#/components/schemas/Timestamp"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"description":"URL of the domain in the API","$ref":"#/components/schemas/URL"}},"required":["location"]}},"required":["object","domain","status","autoJoinEnabled","defaultRole","createdAt","urls"]},"OrganizationDomainStatus":{"type":"string","description":"Verification status of the domain. \"legacy\" is a domain added before verification existed: it keeps letting people join automatically without being verified.\n","enum":["legacy","pending","verified","error"]},"OrganizationDomainDefaultRole":{"description":"Role given to people who join through the domain. \"default\" uses the organization's default role, and \"guest\" adds them as guests.\n","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","enum":["default","guest"]}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"Timestamp":{"type":"string","format":"date-time"},"URL":{"type":"string","format":"uri","maxLength":2048}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}},"ConflictError":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[409]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/domains/{emailDomain}/verify":{"post":{"operationId":"verifyOrganizationDomain","summary":"Verify an email domain of an organization","description":"Checks the domain's DNS TXT record. A legacy domain first gets its verification record, and keeps letting people join until it is verified.\n","tags":["organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/emailDomain"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomain"}}}},"404":{"$ref":"#/components/responses/NotFoundError"},"409":{"$ref":"#/components/responses/ConflictError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/organizations/verify-an-email-domain-of-an-organization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
