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

# Redeem an invite

> Accepts an invite and joins the workspace. If the email address has no existing
account, a new account is created using the provided `name`. Returns an API token
that can be used immediately.

This endpoint returns HTTP 201.




## OpenAPI

````yaml /api/openapi.yaml post /invites/redeem
openapi: 3.1.0
info:
  title: Slog API
  version: 1.0.0
  description: >
    Slog is an AI-native project management tool. This reference covers the core
    REST API

    for managing tasks, projects, teams, milestones, workspaces, and invites.


    ## Authentication


    All authenticated endpoints accept either an **API key** (header
    `slog-api-key`) or a

    **Bearer token** (header `Authorization: Bearer <token>`). Tokens are
    returned by the

    signup, invite-redeem, and OAuth flows. API keys can be created in the Slog
    dashboard.


    ## Field selection


    Every list and get endpoint accepts a `fields` query parameter to control
    which fields

    are returned. Use comma-separated field names; nested objects can be
    selected with brace

    notation:


    ```

    fields=id,title,status,assignee{name,email}

    ```


    When omitted, a default set of fields is returned for each resource.


    ## Filtering


    List endpoints support structured filters using bracket notation:


    ```

    filter[eq][status]=TODO

    filter[contains][title]=auth

    filter[in][status]=TODO&filter[in][status]=IN_PROGRESS

    filter[gte][dueDate]=2026-01-01

    ```


    Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`,
    `startsWith`, `in`.


    ## Sorting


    ```

    sort[createdAt]=desc

    sort[title]=asc

    ```


    ## Pagination


    List endpoints use cursor-based pagination. Pass the `nextCursor` from the
    previous

    response as the `cursor` parameter to fetch the next page. A `null`
    nextCursor means

    you've reached the end.
  contact:
    url: https://slog.ai
servers:
  - url: https://slog.ai
    description: Production
  - url: http://localhost:3020
    description: Local development
security:
  - ApiKey: []
  - BearerToken: []
tags:
  - name: Health
    description: Liveness check. No authentication required.
  - name: Authentication
    description: Sign up, log in, and inspect the current user.
  - name: Tasks
    description: >
      Tasks are the primary unit of work. They belong to a team and optionally
      to a project.

      Subtasks are created by setting `parentId` on the child task. Each task
      gets a

      human-readable reference code like `ENG-42` derived from its team prefix.
  - name: Projects
    description: Projects group related tasks within a team and can contain milestones.
  - name: Teams
    description: >
      Teams are the organizational unit that owns tasks and projects. Each team
      has a short

      prefix (e.g. `ENG`) used to generate task and project reference codes.
      Teams can be

      nested via `parentId`.
  - name: Milestones
    description: Milestones represent time-boxed goals. They live under a project.
  - name: Workspaces
    description: >-
      A workspace is the top-level container. Users belong to one or more
      workspaces.
  - name: Invites
    description: Invite new members to a workspace by email.
  - name: Agents
    description: Create and manage AI agent users within a workspace.
  - name: API Keys
    description: Manage API keys for the current user and their owned agents.
  - name: Fields
    description: >
      Custom field definitions for extending resource types. Built-in fields
      (id, title,

      status, etc.) are automatically included in list responses. Custom fields
      are

      workspace-scoped and can target one or more resource types.
  - name: Batch
    description: Fetch multiple resources in a single round-trip.
  - name: Search
    description: >
      Unified, cross-resource text search over tasks, projects, and milestones
      using a

      single human-friendly query syntax. See the Search guide for the full
      grammar.
  - name: Import/Export
    description: Export a resource to a portable format and import it back.
  - name: Comments
    description: Comments can be added to tasks, projects, or milestones.
  - name: Labels
    description: >-
      Labels are workspace-scoped tags that can be attached to tasks and
      projects.
  - name: Team Members
    description: Manage team membership and roles.
  - name: Users
    description: User accounts within the workspace.
paths:
  /invites/redeem:
    post:
      tags:
        - Invites
      summary: Redeem an invite
      description: >
        Accepts an invite and joins the workspace. If the email address has no
        existing

        account, a new account is created using the provided `name`. Returns an
        API token

        that can be used immediately.


        This endpoint returns HTTP 201.
      operationId: redeemInvite
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
              properties:
                token:
                  type: string
                  description: The invite token from the invite email.
                  example: inv_tok_01jqinv01234abcd
                name:
                  type: string
                  minLength: 1
                  description: >-
                    Display name for the new user (only used if creating a new
                    account).
                  example: Jamie Lee
      responses:
        '201':
          description: Invite redeemed. Use `api_token` to authenticate.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_token:
                    type: string
                    description: Bearer token for the joined workspace.
                    example: slog_key_01jqapikey5678efgh
                  workspace:
                    type: object
                    properties:
                      id:
                        type: string
                        example: ws_01jqworksp001
                      name:
                        type: string
                        example: Acme Engineering
                      slug:
                        type: string
                        example: acme-engineering
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
      security: []
components:
  responses:
    NotFound:
      description: Resource not found or not visible to the caller.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: NOT_FOUND
              message: Task not found
    UnprocessableEntity:
      description: Validation failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                description: Map of field names to arrays of validation error messages.
          example:
            errors:
              email:
                - The email field must be a valid email address
              code:
                - The code field must be exactly 6 characters long
  schemas:
    ErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: Task not found
            details:
              type: object
              additionalProperties: true
              description: Additional error context, if any.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: slog-api-key
      description: >
        API key obtained from the Slog dashboard or returned by the
        signup/invite-redeem

        flows. Pass as the `slog-api-key` header.
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT obtained from an OAuth callback or the CLI device-flow. Pass as
        `Authorization: Bearer <token>`.

````