Permit.io Email Templates API

None

Operations 4

GET /v2/facts/{proj_id}/{env_id}/email_templates/ List Templates #
GET /v2/facts/{proj_id}/{env_id}/email_templates/{template_type} Get Template By Type #
POST /v2/facts/{proj_id}/{env_id}/email_templates/{template_type} Update Template By Type #
POST /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email Send Test Email By Type #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/permit-io-email-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

permit-io-email-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Permit.io Access Requests (EAP) Access Requests (EAP) Email Templates API
  description: '

    Authorization as a service

    '
  version: 2.0.0
servers:
- url: https://api.permit.io
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Email Templates
  description: None
paths:
  /v2/facts/{proj_id}/{env_id}/email_templates/:
    get:
      tags:
      - Email Templates
      summary: List Templates
      description: Lists all the email configurations defined within an environment.
      operationId: list_templates
      parameters:
      - description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Proj Id
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
        name: proj_id
        in: path
      - description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Env Id
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
        name: env_id
        in: path
      - description: Page number of the results to fetch, starting at 1.
        required: false
        schema:
          type: integer
          minimum: 1.0
          title: Page
          description: Page number of the results to fetch, starting at 1.
          default: 1
        name: page
        in: query
      - description: The number of results per page (max 100).
        required: false
        schema:
          type: integer
          maximum: 100.0
          minimum: 1.0
          title: Per Page
          description: The number of results per page (max 100).
          default: 30
        name: per_page
        in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/EmailTemplateRead'
                type: array
                title: Response List Templates V2 Facts  Proj Id   Env Id  Email Templates  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}:
    get:
      tags:
      - Email Templates
      summary: Get Template By Type
      description: Lists all the email configurations defined within an environment.
      operationId: get_template_by_type
      parameters:
      - required: true
        schema:
          $ref: '#/components/schemas/EmailTemplateType'
        name: template_type
        in: path
      - description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Proj Id
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
        name: proj_id
        in: path
      - description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Env Id
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
        name: env_id
        in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
    post:
      tags:
      - Email Templates
      summary: Update Template By Type
      description: Updates an email template by a given type.
      operationId: update_template_by_type
      parameters:
      - required: true
        schema:
          $ref: '#/components/schemas/EmailTemplateType'
        name: template_type
        in: path
      - description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Proj Id
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
        name: proj_id
        in: path
      - description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Env Id
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
        name: env_id
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/facts/{proj_id}/{env_id}/email_templates/{template_type}/send_test_email:
    post:
      tags:
      - Email Templates
      summary: Send Test Email By Type
      operationId: send_test_email_by_type
      parameters:
      - required: true
        schema:
          $ref: '#/components/schemas/EmailTemplateType'
        name: template_type
        in: path
      - description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Proj Id
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
        name: proj_id
        in: path
      - description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        required: true
        schema:
          type: string
          title: Env Id
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
        name: env_id
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    EmailTemplateRead:
      properties:
        template_type:
          allOf:
          - $ref: '#/components/schemas/EmailTemplateType'
          description: The type of the email template, can be either 'approval_flows' or 'user_management'
        id:
          type: string
          format: uuid
          title: Id
          description: Unique id of the EmailTemplate
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Unique id of the organization that the EmailTemplate belongs to.
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Unique id of the project that the EmailTemplate belongs to.
        environment_id:
          type: string
          format: uuid
          title: Environment Id
          description: Unique id of the environment that the EmailTemplate belongs to.
        from_address:
          type: string
          format: email
          title: From Address
          description: The from address the mails will be sent from
        redirect_to:
          type: string
          maxLength: 65536
          minLength: 1
          format: uri
          title: Redirect To
          description: The redirect url the user will be redirected to after clicking the link in the email
        url_ttl:
          type: string
          title: Url Ttl
          description: The time to live of the url in the email, in seconds
        subject:
          type: string
          title: Subject
          description: The subject of the email template
        messages:
          items:
            $ref: '#/components/schemas/EmailTemplateMessage'
          type: array
          title: Messages
          description: The messages of the email template
      additionalProperties: false
      type: object
      required:
      - template_type
      - id
      - organization_id
      - project_id
      - environment_id
      - from_address
      - redirect_to
      - url_ttl
      - subject
      - messages
      title: EmailTemplateRead
    EmailTemplateMessage:
      properties:
        message_type:
          allOf:
          - $ref: '#/components/schemas/EmailMessageKeys'
          description: The key of the message, can be either 'approval_flows_deny', 'approval_flows_approve', 'approval_flows_request'
        message_content:
          type: string
          title: Message Content
          description: The value of the message
      additionalProperties: false
      type: object
      required:
      - message_type
      - message_content
      title: EmailTemplateMessage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailMessageKeys:
      type: string
      enum:
      - approval_flows_deny
      - user_management_invite
      - approval_flows_approve
      - approval_flows_request
      - test_email
      title: EmailMessageKeys
      description: An enumeration.
    EmailTemplateUpdate:
      properties:
        from_address:
          type: string
          format: email
          title: From Address
          description: The from address the mails will be sent from
        redirect_to:
          type: string
          maxLength: 65536
          minLength: 1
          format: uri
          title: Redirect To
          description: The redirect url the user will be redirected to after clicking the link in the email
        url_ttl:
          type: string
          title: Url Ttl
          description: The time to live of the url in the email, in seconds
        subject:
          type: string
          title: Subject
          description: The subject of the email template
        messages:
          items:
            $ref: '#/components/schemas/EmailTemplateMessage'
          type: array
          title: Messages
          description: The messages of the email template
      additionalProperties: false
      type: object
      required:
      - from_address
      - redirect_to
      - url_ttl
      - subject
      - messages
      title: EmailTemplateUpdate
    EmailTemplateType:
      type: string
      enum:
      - approval_flows
      - user_management
      - test_email
      title: EmailTemplateType
      description: An enumeration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: 'Authorization header, we support the bearer authentication scheme (see: RFC 6750)'
      scheme: bearer
      bearerFormat: JWT