> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapnito.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an organisation

> Creates an organisation in the community and adds it to the default organisation group



## OpenAPI

````yaml https://api.zapnito.com/api/docs/v1/swagger.json post /api/v1/organisations
openapi: 3.0.1
info:
  title: API V1
  version: v1
  description: Zapnito API Documentation
servers:
  - url: https://{host}
    description: Your community domain
    variables:
      host:
        default: your-community.com
        description: Your community domain, for example your-community.com
security: []
tags:
  - name: Health Check
    description: Check that the API is reachable and that your API key is valid
  - name: Identity
    description: Find out which community your API key belongs to
  - name: Users
    description: >-
      Look up the people in your community, update their profile and choose
      which notifications they receive
  - name: Organisations
    description: >-
      Create and update the organisations in your community and manage who
      belongs to them
  - name: Groups
    description: Create groups and manage which users belong to them
  - name: Invitations
    description: Invite people to join your community
  - name: Posts
    description: Create, read and update posts on behalf of your community members
  - name: Contents
    description: >-
      Read the published content of your community and publish, schedule or
      unpublish it
  - name: Channels
    description: List the channels in your community and the content published in each
  - name: Rooms
    description: Create and read the rooms where your community members meet
  - name: Tags
    description: Create tags and apply them to content
  - name: Badges
    description: Create badges and award them to content or to users
  - name: Custom Fields
    description: Read the custom profile fields your community asks its members to fill in
  - name: Third-Party Resources
    description: >-
      Link to resources hosted outside your community so they appear alongside
      your content
  - name: Rest Hooks
    description: >-
      Subscribe a URL to events in your community, so you are told when they
      happen
paths:
  /api/v1/organisations:
    post:
      tags:
        - Organisations
      summary: Create an organisation
      description: >-
        Creates an organisation in the community and adds it to the default
        organisation group
      operationId: createOrganisation
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganisationCreateRequest'
            examples:
              new_organisation:
                summary: An organisation with its name and email address
                value:
                  organisation:
                    name: Acme Corp
                    email: contact@acme.example.com
        required: true
        description: Organisation payload wrapped in an organisation object
      responses:
        '200':
          description: The organisation was created
          content:
            application/json:
              examples:
                example:
                  value:
                    organisation:
                      id: 1
                      name: Acme Corp
                      email: contact@acme.example.com
                      public_email: hello@acme.example.com
                      profile: Acme Corp builds tools for researchers
                      address: 1 High Street, London
                      country: GB
                      website_url: https://acme.example.com
                      public_phone_number: +44 20 7946 0000
                      avatar_url: https://example.com/avatar.png
                      terms: true
                      confirmed_at: '2024-01-01T00:00:00Z'
              schema:
                type: object
                properties:
                  organisation:
                    $ref: '#/components/schemas/Organisation'
                required:
                  - organisation
        '401':
          description: >-
            The API key is missing or invalid. The response body is the text
            `HTTP Token: Access denied.`
        '409':
          description: An organisation with the same email address already exists
          content:
            application/json:
              examples:
                error:
                  value:
                    errors: Organisation with this email address already exists
                    id: 1
              schema:
                type: object
                properties:
                  errors:
                    type: string
                    example: Organisation with this email address already exists
                  id:
                    type: integer
                    example: 1
                    description: The ID of the existing organisation
                required:
                  - errors
                  - id
        '422':
          description: The request failed validation
          content:
            application/json:
              examples:
                error:
                  value:
                    errors:
                      email:
                        - can't be blank
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        items:
                          type: string
                        example:
                          - can't be blank
                required:
                  - errors
      security:
        - tokenAuth: []
components:
  schemas:
    OrganisationCreateRequest:
      type: object
      properties:
        organisation:
          type: object
          properties:
            name:
              type: string
              example: Acme Corp
            email:
              type: string
              format: email
              example: contact@acme.example.com
            public_email:
              type: string
              format: email
              example: hello@acme.example.com
            profile:
              type: string
              example: Acme Corp builds tools for researchers
            address:
              type: string
              example: 1 High Street, London
            country:
              type: string
              example: GB
            website_url:
              type: string
              example: https://acme.example.com
            public_phone_number:
              type: string
              example: +44 20 7946 0000
            remote_avatar_url:
              type: string
              example: https://example.com/avatar.png
              description: URL of an image to download and use as the organisation avatar
          required:
            - name
            - email
      required:
        - organisation
    Organisation:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Acme Corp
        email:
          type: string
          format: email
          example: contact@acme.example.com
        public_email:
          type: string
          nullable: true
          example: hello@acme.example.com
        profile:
          type: string
          nullable: true
          example: Acme Corp builds tools for researchers
        address:
          type: string
          nullable: true
          example: 1 High Street, London
        country:
          type: string
          nullable: true
          example: GB
        website_url:
          type: string
          nullable: true
          example: https://acme.example.com
        public_phone_number:
          type: string
          nullable: true
          example: +44 20 7946 0000
        avatar_url:
          type: string
          nullable: true
          example: https://example.com/avatar.png
        terms:
          type: boolean
          example: true
          description: Whether the organisation has accepted the terms and conditions
        confirmed_at:
          type: string
          nullable: true
          format: date-time
          example: '2024-01-01T00:00:00Z'
          description: When the organisation was confirmed. Null until it is
      required:
        - id
        - name
        - email
        - terms
  securitySchemes:
    tokenAuth:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        API authentication using your community API secret. The value below is
        sent as the Authorization header verbatim, so paste the whole header
        value including the prefix: Token token=<api-key>
      x-default: Token token=<api-key>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.