Opal URL Previews API

The URL Previews API from Opal — 1 operation(s) for url previews.

Operations 1

POST /api/v1/asset_references/url_preview Create a new URL Preview #

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/opal-url-previews-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

opal-url-previews-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.0.0
  title: Opal URL Previews API
  license:
    name: Opal API License
    url: https://www.workwithopal.com/api-license
  description: The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
servers:
- url: https://login.ouropal.com
tags:
- name: URL Previews
paths:
  /api/v1/asset_references/url_preview:
    post:
      tags:
      - URL Previews
      operationId: CreateUrlPreviewV1
      summary: Create a new URL Preview
      security:
      - oauth2:
        - offline_access
      - api_key:
        - Session-Token
      description: Creates a new `AssetReference` record using the supplied `source_url`.
      requestBody:
        content:
          application/json:
            x-not-json-api: true
            schema:
              type: object
              required:
              - source_url
              - post_id
              properties:
                source_url:
                  type: string
                  description: The URL from which the URL Preview should be created.
                post_id:
                  type: string
                  description: The Id of the Content this preview represents.
            example:
              source_url: https://www.cnn.com
              post_id: '1234'
      responses:
        '200':
          description: A newly created asset reference resource.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    title: asset_reference
                    type: object
                    required:
                    - id
                    - attributes
                    - type
                    - relationships
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                        pattern: ^[0-9]+$
                      type:
                        type: string
                        enum:
                        - asset_reference
                      attributes:
                        type: object
                        required:
                        - asset_type
                        - asset_uuid
                        - content_type
                        - format
                        - filename
                        - escaped_filename
                        - filesize
                        - full_url
                        - meta_data
                        - original_url
                        - preview_url
                        - public_id
                        - width
                        - height
                        - uuid
                        additionalProperties: false
                        properties:
                          asset_type:
                            type:
                            - string
                            - 'null'
                            description: 'This field is semi-open ended but should be set to `image`, `audio`,

                              or `video` for those respective types of media and `file` for most

                              other types of media.

                              '
                          asset_source:
                            type:
                            - string
                            - 'null'
                            description: 'Asset Sources are pre-existing records indicating the origin of an

                              asset reference. You can''t set this field to arbitrary values. If you

                              know of an Asset Source and you''d like to indicate a new asset

                              reference originated with that source, this field should contain that

                              source''s name.

                              '
                          asset_uuid:
                            type:
                            - string
                            - 'null'
                            description: 'The `id` of an `asset` resource this asset reference will surface

                              within the Asset Library.

                              '
                          content_type:
                            type:
                            - string
                            - 'null'
                            description: 'This field was used by some legacy systems. It is exposed for

                              historical reasons. If set, setting it to the same value as

                              `asset_type` is generally a good idea. It is not a MIME type.

                              '
                          description:
                            type:
                            - string
                            - 'null'
                          format:
                            type:
                            - string
                            - 'null'
                            description: 'Used differently by some legacy systems but any new asset reference

                              should use the `format` field to store its filetype extension (ex. `png`,

                              `mp4`, `gif`, `mov`, etc.).

                              '
                          filename:
                            type:
                            - string
                            - 'null'
                          escaped_filename:
                            type: string
                            readOnly: true
                          filesize:
                            type:
                            - integer
                            - 'null'
                            description: Size of file in bytes.
                          full_url:
                            type:
                            - string
                            - 'null'
                            description: 'When associating an asset with an asset reference, this field

                              should be set to the `url` property of the asset.

                              '
                          meta_data:
                            type:
                            - object
                            - 'null'
                            description: Can contain arbitrary key-value pairs related to the asset.
                            properties:
                              duration:
                                type: string
                                description: Parsed from video assets.
                              page_count:
                                type: string
                                description: Parsed from PDF assets.
                              processed_height:
                                type: string
                                description: Parsed from video assets.
                              processed_width:
                                type: string
                                description: Parsed from video assets.
                            additionalProperties:
                              type: string
                          original_url:
                            type:
                            - string
                            - 'null'
                          preview_url:
                            type:
                            - string
                            - 'null'
                            readOnly: true
                          public_id:
                            type:
                            - string
                            - 'null'
                          width:
                            type:
                            - integer
                            - 'null'
                            description: 'When associating an asset with an asset reference, this field

                              should be set to the `width` of the asset.

                              '
                          height:
                            type:
                            - integer
                            - 'null'
                            description: 'When associating an asset with an asset reference, this field

                              should be set to the `height` of the asset.

                              '
                          uuid:
                            type: string
                            readOnly: true
                            description: 'Use this ID when referring to the same asset reference from one of

                              Opal''s v3 APIs.

                              '
                      relationships:
                        type: object
                        additionalProperties: false
                        properties:
                          brand:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type:
                                - object
                                - 'null'
                                required:
                                - id
                                - type
                                additionalProperties: false
                                properties:
                                  id:
                                    type: string
                                  type:
                                    type: string
                                    enum:
                                    - brand
                          stories:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  required:
                                  - id
                                  - type
                                  additionalProperties: false
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                      - story
                          cover_asset_reference:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type:
                                - object
                                - 'null'
                                required:
                                - id
                                - type
                                additionalProperties: false
                                properties:
                                  id:
                                    type: string
                                  type:
                                    type: string
                                    enum:
                                    - asset_reference
                          labels:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  required:
                                  - id
                                  - type
                                  additionalProperties: false
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                      - label
                          asset_reference_options:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  required:
                                  - id
                                  - type
                                  additionalProperties: false
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                      - asset_reference_option
                          options:
                            type: object
                            required:
                            - data
                            additionalProperties: false
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  required:
                                  - id
                                  - type
                                  additionalProperties: false
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                      - option
              example:
                data:
                  id: '2370267'
                  type: asset_reference
                  attributes:
                    id: 2370267
                    uuid: c3f80757-c0ea-422c-aa51-3c9ef8e11a76
                    asset_type: url_preview_image
                    asset_uuid: c3f80757-c0ea-422c-aa51-3c9ef8e11a76
                    content_type: image
                    height: 1103
                    escaped_filename: abcd+10-17-19+02-59-PM
                    filename: abcd 10-17-19 02-59-PM.png
                    filesize: 22059
                    format: png
                    full_url: https://login.opal.docker/api/v1/asset_proxy/0f84ebf8-954d-4cbe-921d-65acbf6d1280
                    meta_data: {}
                    original_url: https://login.opal.docker/api/v1/asset_proxy/0f84ebf8-954d-4cbe-921d-65acbf6d1280
                    public_id: cbuuncsbvyr60kxxd4jq
                    width: 1480
                    asset_source: Opal
                    preview_url: https://login.opal.docker/api/v1/asset_proxy/preview/0f84ebf8-954d-4cbe-921d-65acbf6d1280
                  relationships:
                    stories:
                      data: []
                    brand:
                      data:
                        id: '2307'
                        type: brand
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                        detail:
                          type: string
                      required:
                      - status
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                required:
                - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        title:
                          type: string
                        detail:
                          type: string
                      required:
                      - status
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: This API uses OAuth 2.0 with the authorization code grant flow. You can find more detailed authentication instructions in the [Authentication Strategies](/api/documentation#section/Authentication-Strategies/OAuth-2.0) section.
      flows:
        authorizationCode:
          authorizationUrl: /oauth2/auth
          tokenUrl: /oauth2/token
          scopes:
            offline_access: Include this scope if you wish to receive a refresh token
    api_key:
      type: apiKey
      description: (Deprecated) This API also supports authentication via an API or session token set in the request headers.
      in: header
      name: Session-Token
x-tagGroups:
- name: JSON:API
  tags:
  - Accounts
  - Activities
  - Annotations
  - Asset Reference Options
  - Asset Reference Usage Rights Options
  - Asset References
  - Assets
  - Brand Settings
  - Brands
  - Checkpoints
  - Content
  - Delivery Records
  - Label Sets
  - Labels
  - Messages
  - Moments
  - Phase Items
  - Placements
  - Post Types
  - Privacy
  - Reactions
  - Rich Texts
  - Services
  - Stamps
  - Stories
  - Url Uploads
  - User Domain Views
  - Users
  - Workflows
- name: Other
  tags:
  - Budgets
  - URL Previews
  - Search
  - Stories V1
- name: ⚠️  Unstable
  tags: []
- name: Additional Resources
  tags:
  - secondary_resources