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

# Get an endpoint



## OpenAPI

````yaml GET /apps/connect/v1/endpoints/{id}
openapi: 3.1.0
info:
  title: Invopop Connect configuration API
  version: 1.0.0
  description: >-
    Configure how Connect receives and imports a workspace's invoices: rules
    (short instructions for the AI that reads PDFs and images), profiles
    (ordered groups of rules a workflow's import step uses) and endpoints (HTTP
    upload URLs and email addresses that receive documents). Documents give what
    an import recorded for a silo entry.


    Call it through Invopop's API at https://api.invopop.com/apps/connect with a
    workspace token: `Authorization: Bearer <token>`. The workspace must have
    the Connect app enabled.


    Typical setup:

    1. Create rules: `POST /v1/rules {"text": "Use the de-xrechnung-v3 addon"}`.
    Each gets a `number`.

    2. Create a profile from them: `POST /v1/profiles {"name": "Germany",
    "rules": [1, 2]}`, and keep its `id`.

    3. In the workflow's "Import document" step, choose that profile (its config
    is `{"profile_id": "<id>"}`).

    4. Create an endpoint that runs the workflow: `POST /v1/endpoints
    {"channel": "http", "slug": "suppliers", "workflow_id": "<workflow id>",
    "config": {"security": {"type": "bearer", "token": "<secret>"}}}`. Send
    documents to its `uri`.


    Errors answer `{"status": "error", "message": "..."}`: 401 bad token or
    Connect not enabled, 404 not found, 422 invalid request (the message says
    which field and why).
  contact:
    email: dev@invopop.com
    name: Invopop Developers
servers:
  - description: production
    url: https://api.invopop.com
security:
  - InvopopAuth: []
paths:
  /apps/connect/v1/endpoints/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The endpoint's id
    get:
      summary: Get an endpoint
      operationId: getEndpoint
      responses:
        '200':
          description: The endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
        '404':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Endpoint:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        channel:
          type: string
          enum:
            - http
            - email
        workflow_id:
          type: string
        uri:
          type: string
          description: >-
            Where senders reach the endpoint: the URL to POST documents to
            (http), or the address documents are sent to (email)
        accept:
          type: array
          items:
            type: string
        disabled:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        config:
          description: The channel's config as given, without secrets
          anyOf:
            - $ref: '#/components/schemas/HTTPConfig'
            - $ref: '#/components/schemas/EmailConfig'
    HTTPConfig:
      type: object
      description: >-
        The http channel's config: how uploads authenticate. Secrets are stored
        encrypted and never returned.
      properties:
        security:
          type: object
          description: >-
            How an http endpoint authenticates uploads. Secrets are stored
            encrypted and never returned.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - none
                - bearer
                - basic
                - hmac
              description: >-
                none: anyone with the url. bearer: `Authorization: Bearer
                <token>`. basic: HTTP Basic with user and pass. hmac:
                `X-Signature` holds the hex HMAC-SHA256 of the body keyed with
                secret.
            token:
              type: string
              description: For bearer
            user:
              type: string
              description: For basic
            pass:
              type: string
              description: For basic
            secret:
              type: string
              description: For hmac
    EmailConfig:
      type: object
      description: >-
        The email channel's config: how messages reach the endpoint. Passwords
        and API keys are stored encrypted and never returned.
      required:
        - provider
      properties:
        provider:
          type: string
          enum:
            - invopop
            - imap
            - resend
            - sendgrid
          description: >-
            invopop: an address on Invopop's receiving domain (address is its
            name, before the @; empty uses the slug). imap: Connect reads a
            folder of your mailbox. resend: mail your own Resend account
            receives. sendgrid: mail a hostname of your own SendGrid account
            receives through Inbound Parse.
        address:
          type: string
          description: 'For invopop: the address name'
        imap:
          type: object
          description: For imap
          required:
            - host
            - username
          properties:
            host:
              type: string
            port:
              type: integer
              description: Default 993
            security:
              type: string
              enum:
                - tls
                - starttls
            username:
              type: string
            password:
              type: string
              description: Required when creating; empty on update keeps the stored one
            folder:
              type: string
              description: Default INBOX
            after_read:
              type: string
              enum:
                - none
                - seen
                - move
              description: What to do with a message once read
            move_to:
              type: string
              description: For after_read move
        resend:
          type: object
          description: For resend
          required:
            - recipient
          properties:
            api_key:
              type: string
              description: >-
                A full access key (Connect creates its webhook with it);
                required when creating, left out on update keeps the stored one
            recipient:
              type: string
              description: The address that receives the documents
        sendgrid:
          type: object
          description: For sendgrid
          required:
            - hostname
          properties:
            api_key:
              type: string
              description: >-
                A key allowed to manage Inbound Parse settings (Connect creates
                the setting with it); required when creating, left out on update
                keeps the stored one
            region:
              type: string
              enum:
                - global
                - eu
              description: The account's API region; default global
            hostname:
              type: string
              description: >-
                The hostname that receives the documents; its MX record points
                at mx.sendgrid.net
            recipient:
              type: string
              description: One address on the hostname to take; empty takes every address
        allowed_senders:
          type: array
          items:
            type: string
          description: >-
            Addresses or domains ("supplier.com") allowed to send; empty allows
            anyone
      oneOf:
        - title: Invopop address
          properties:
            provider:
              const: invopop
        - title: IMAP mailbox
          required:
            - imap
          properties:
            provider:
              const: imap
        - title: Resend
          required:
            - resend
          properties:
            provider:
              const: resend
        - title: SendGrid
          required:
            - sendgrid
          properties:
            provider:
              const: sendgrid
  responses:
    Error:
      description: An error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                const: error
              message:
                type: string
  securitySchemes:
    InvopopAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace token in the `Bearer` scheme. The workspace must have the
        Connect app enabled.

````

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