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

# Create a request

> Create a request. <h3>OAuth</h3>Required scopes: <code>visitors</code>



## OpenAPI

````yaml /assets/openapi.json post /visitors/requests/v1
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /visitors/requests/v1:
    post:
      tags:
        - Visitors
      summary: Create a request
      description: 'Create a request. <h3>OAuth</h3>Required scopes: <code>visitors</code>'
      operationId: createRequest
      parameters:
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/createVisitRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  request:
                    $ref: '#/components/schemas/visitRequest'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - visitors
components:
  requestBodies:
    createVisitRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              request:
                description: Visit request to create.
                type: object
                properties:
                  locationRef:
                    description: ID of the location for the visit request.
                    type: string
                    format: uuid
                  userRefHost:
                    description: ID of the host user for the visit request.
                    type: string
                    format: uuid
                  visitor:
                    description: Visitor details for the visit request.
                    type: object
                    properties:
                      email:
                        description: Visitor email address.
                        type: string
                        minLength: 1
                      name:
                        description: Visitor first name.
                        type: string
                        minLength: 1
                      phoneNumber:
                        description: Visitor phone number.
                        type: string
                      surname:
                        description: Visitor surname.
                        type: string
                    required:
                      - email
                      - name
                required:
                  - locationRef
                  - userRefHost
                  - visitor
            required:
              - request
      required: true
  schemas:
    visitRequest:
      type: object
      properties:
        createDate:
          description: ISO timestamp of when the request was created.
          type: string
          format: date-time
        id:
          description: Unique identifier of the visit request.
          type: string
          format: uuid
        locationRef:
          description: ID of the location for the requested visit.
          type: string
          format: uuid
        membershipRefHost:
          description: ID of the host membership.
          type: string
          format: uuid
        userHost:
          description: Host user details.
          type: object
          properties:
            id:
              description: Unique identifier of the host user.
              type: string
              format: uuid
            name:
              description: First name of the host user.
              nullable: true
              type: string
            photoUrl:
              description: Profile photo URL of the host user.
              nullable: true
              type: string
            surname:
              description: Surname of the host user.
              nullable: true
              type: string
          required:
            - id
          additionalProperties: false
        userRefHost:
          description: ID of the host user.
          type: string
          format: uuid
        userRefVisitor:
          description: ID of the visitor user.
          type: string
          format: uuid
        visitor:
          description: Visitor details.
          type: object
          properties:
            email:
              description: Visitor email address.
              type: string
            name:
              description: Visitor first name.
              type: string
            phoneNumber:
              description: Visitor phone number.
              type: string
            surname:
              description: Visitor surname.
              type: string
          required:
            - email
            - name
          additionalProperties: false
      required:
        - createDate
        - id
        - locationRef
        - membershipRefHost
        - userRefHost
        - userRefVisitor
        - visitor
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````