openapi: 3.0.3 info: title: Hex.pm API Keys Utilities API description: REST API for the Hex.pm package registry, providing endpoints to search and retrieve package metadata, manage releases, handle authentication, manage API keys, and administer organizations and package ownership. The API supports JSON and Erlang media types. version: 1.0.0 contact: name: Hex Support email: support@hex.pm url: https://hex.pm/docs termsOfService: https://hex.pm/policies/terms license: name: Hex.pm Terms of Service url: https://hex.pm/policies/terms servers: - url: https://hex.pm/api description: Hex.pm Production API security: - ApiKeyAuth: [] tags: - name: Utilities description: Utility endpoints. paths: /short_url: post: operationId: createShortUrl summary: Create Short URL description: Creates a short URL for a given long URL. tags: - Utilities requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ShortUrl' responses: '201': description: Short URL created. content: application/json: schema: type: object properties: short_url: type: string format: uri url: type: string format: uri components: schemas: ShortUrl: type: object required: - url properties: url: type: string format: uri description: The long URL to shorten. securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization description: 'API token authentication. Pass the token directly: `Authorization: token`. For OAuth2 Bearer tokens use: `Authorization: Bearer token`.' BearerAuth: type: http scheme: bearer description: OAuth2 Bearer token obtained via Device Authorization Grant (RFC 8628). BasicAuth: type: http scheme: basic description: Deprecated. Basic authentication with username and password. Only allowed on specific endpoints for generating API tokens. externalDocs: description: Hex.pm API Documentation url: https://hex.pm/docs/api