openapi: 3.0.0
info:
  title: Pinata API
  description: ''
  termsOfService: https://www.pinata.cloud/terms-conditions
  contact:
    name: Pinata Team
    email: team@pinata.cloud
  version: 1.0.0
servers:
  - url: https://api.pinata.cloud
security:
  - bearerAuth: []
paths:
  /groups:
    post:
      tags:
        - default
      summary: Create Group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              example:
                name: NFT-Project
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:09:33 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '193'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '179'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720030234'
            ETag:
              schema:
                type: string
                example: W/"c1-uUp+M9dQQ5nQUI1atDruyCBkWlA"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: b8b4c15015682e6e7984b9f31608e668
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the created Group
                  user_id:
                    type: string
                    description: ID of the user who created the Group
                  name:
                    type: string
                    description: Name of the Group
                  updatedAt:
                    type: string
                    description: ISO 8601 format date of the last time Group was updated
                  createdAt:
                    type: string
                    description: ISO 8601 format date of Group creation
              example:
                id: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
                user_id: ec50a085-a746-428d-b01d-167ac379fbd4
                name: NFT-Project
                updatedAt: '2024-07-03T18:09:33.610Z'
                createdAt: '2024-07-03T18:09:33.610Z'
    get:
      tags:
        - default
      summary: List Groups
      parameters:
        - name: nameContains
          in: query
          schema:
            type: string
          description: Filter by name of the group
          example: Project
        - name: offset
          in: query
          schema:
            type: integer
          description: Paginate through next series of groups
          example: '10'
        - name: limit
          in: query
          schema:
            type: integer
          description: Limit the number of results
          example: '10'
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:39:35 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '203'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '176'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720031993'
            ETag:
              schema:
                type: string
                example: W/"cb-XW74NkGUnfDSInaF+GaEbIAZ4wA"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: 8a844c92e837e5e36a36b57f3a7570c3
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: ID of the created Group
                    user_id:
                      type: string
                      description: ID of the user who created the Group
                    name:
                      type: string
                      description: Name of the Group
                    updatedAt:
                      type: string
                      description: ISO 8601 format date of the last time Group was updated
                    createdAt:
                      type: string
                      description: ISO 8601 format date of Group creation
              example:
                - id: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
                  name: NFT-Project-updated
                  user_id: ec50a085-a746-428d-b01d-167ac379fbd4
                  createdAt: '2024-07-03T18:09:33.610Z'
                  updatedAt: '2024-07-03T18:15:17.440Z'
  /groups/{id}:
    put:
      tags:
        - default
      summary: Update Group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              example:
                name: NFT-Project-updated
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:12:46 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '201'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '179'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720030427'
            ETag:
              schema:
                type: string
                example: W/"c9-jevqvnylaR5INoN/XPGZNvVf1fE"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: 3a9b0a9afc9000ee2e34da46c89e2aee
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the created Group
                  user_id:
                    type: string
                    description: ID of the user who created the Group
                  name:
                    type: string
                    description: Name of the Group
                  updatedAt:
                    type: string
                    description: ISO 8601 format date of the last time Group was updated
                  createdAt:
                    type: string
                    description: ISO 8601 format date of Group creation
              example:
                id: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
                name: NFT-Project-updated
                user_id: ec50a085-a746-428d-b01d-167ac379fbd4
                createdAt: '2024-07-03T18:09:33.610Z'
                updatedAt: '2024-07-03T18:12:46.930Z'
    delete:
      tags:
        - default
      summary: Delete Group
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: eaa137d2-fc36-43dd-80c1-cba1fd6c798e
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 19:31:24 GMT
            Content-Type:
              schema:
                type: string
                example: text/plain; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '2'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '175'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720035092'
            ETag:
              schema:
                type: string
                example: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: ea9b8709c6860c08f53bd77c96dc4bdf
          content:
            text/plain:
              schema:
                type: string
              example: OK
    get:
      tags:
        - default
      summary: Get a Group
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:39:35 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '203'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '176'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720031993'
            ETag:
              schema:
                type: string
                example: W/"cb-XW74NkGUnfDSInaF+GaEbIAZ4wA"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: 8a844c92e837e5e36a36b57f3a7570c3
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the created Group
                  user_id:
                    type: string
                    description: ID of the user who created the Group
                  name:
                    type: string
                    description: Name of the Group
                  updatedAt:
                    type: string
                    description: ISO 8601 format date of the last time Group was updated
                  createdAt:
                    type: string
                    description: ISO 8601 format date of Group creation
              example:
                - id: 61a4a882-1591-462e-bcb7-fa0eee5f3c51
                  name: NFT-Project-updated
                  user_id: ec50a085-a746-428d-b01d-167ac379fbd4
                  createdAt: '2024-07-03T18:09:33.610Z'
                  updatedAt: '2024-07-03T18:15:17.440Z'
  /groups/{id}/cids:
    put:
      tags:
        - default
      summary: Add CIDs to Group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cids:
                  type: array
                  items:
                    type: string
              example:
                cids:
                  - QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng
                  - bafkreih5aznjvttude6c3wbvqeebb6rlx5wkbzyppv7garjiubll2ceym4
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: eaa137d2-fc36-43dd-80c1-cba1fd6c798e
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:17:02 GMT
            Content-Type:
              schema:
                type: string
                example: text/plain; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '2'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '179'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720030683'
            ETag:
              schema:
                type: string
                example: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: 00f3215befab568ca4c88123ba81b037
          content:
            text/plain:
              schema:
                type: string
              example: OK
    delete:
      tags:
        - default
      summary: Remove CIDs from a Group
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: eaa137d2-fc36-43dd-80c1-cba1fd6c798e
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cids:
                  type: array
                  items:
                    type: string
              example:
                cids:
                  - QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng
                  - bafkreih5aznjvttude6c3wbvqeebb6rlx5wkbzyppv7garjiubll2ceym4
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 03 Jul 2024 18:18:07 GMT
            Content-Type:
              schema:
                type: string
                example: text/plain; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '2'
            Connection:
              schema:
                type: string
                example: keep-alive
            X-Powered-By:
              schema:
                type: string
                example: Express
            Vary:
              schema:
                type: string
                example: Origin
            Access-Control-Allow-Credentials:
              schema:
                type: boolean
                example: 'true'
            X-RateLimit-Limit:
              schema:
                type: integer
                example: '180'
            X-RateLimit-Remaining:
              schema:
                type: integer
                example: '179'
            X-RateLimit-Reset:
              schema:
                type: integer
                example: '1720030748'
            ETag:
              schema:
                type: string
                example: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15724800; includeSubDomains
            X-Request-Id:
              schema:
                type: string
                example: 9e9c8f2f5564cea2688298bd47d484fc
          content:
            text/plain:
              schema:
                type: string
              example: OK
  /data/testAuthentication:
    get:
      summary: Test Authentication
      description: Test your API keys and your ability to connect to the Pinata API
      responses:
        '200':
          description: |-
            {
                message: "Congratulations! You are communicating with the Pinata API!"
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/pinFileToIPFS:
    post:
      summary: Pin File to IPFS
      description: Upload a file to Pinata to be pinned to IPFS
      requestBody:
        description: ''
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/pinning_pinFileToIPFS_body'
            examples:
              Example 1:
                value:
                  file: readstream
                  pinataMetadata:
                    name: Pinnie.json
                  pinataOptions:
                    cidVersion: 1
      responses:
        '200':
          description: |-
            {
                "IpfsHash": "This is the IPFS multi-hash (CID) provided back for your content,"
                "PinSize": "This is how large (in bytes) the content you just pinned is,"
                "Timestamp": "This is the timestamp for your content pinning (represented in ISO 8601 format)"
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/pinJSONToIPFS:
    post:
      summary: Pin JSON
      description: Uploads a JSON object to Pinata and pins it to IPFS
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pinning_pinJSONToIPFS_body'
            examples:
              Example 1:
                value:
                  pinataOptions:
                    cidVersion: 1
                  pinataMetadata:
                    name: pinnie.json
                  pinataContent:
                    somekey: somevalue
      responses:
        '200':
          description: |-
            {
                "IpfsHash": "This is the IPFS multi-hash (CID) provided back for your content,"
                "PinSize": "This is how large (in bytes) the content you just pinned is,"
                "Timestamp": "This is the timestamp for your content pinning (represented in ISO 8601 format)"
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/pinByHash:
    post:
      summary: Pin By CID
      description: Upload a file already on the IPFS network to Pinata
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pinning_pinByHash_body'
      responses:
        '200':
          description: |-
            {
                "id": "ID of the pin by CID job",
                "ipfsHash": "CID submitted",
                "status": "Status of pin by CID job",
                "name": "MyCustomName"
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_2'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/pinJobs:
    get:
      summary: List Pin By CID Jobs
      description: List all currently running pinByHash jobs
      parameters:
        - name: sort
          in: query
          description: Values include ASC or DESC
          required: false
          style: form
          explode: true
          schema:
            type: string
            example: ASC
          examples:
            default:
              value: ASC
        - name: status
          in: query
          description: Filter by the status of the job in the pinning queue
          required: false
          style: form
          explode: true
          schema:
            type: string
            example: retrieving
            enum:
              - prechecking
              - retrieving
              - expired
              - over_free_limit
              - over_max_size
              - invalid_object
              - bad_host_node
              - backfilled
          examples:
            default:
              value: retrieving
        - name: ipfs_pin_hash
          in: query
          description: CID of the file to be pinned
          required: false
          style: form
          explode: true
          schema:
            type: string
            example: CID
          examples:
            default:
              value: CID
        - name: limit
          in: query
          description: Number of jobs to return. Default is 5 and 1000 is the maximum
          required: false
          style: form
          explode: true
          schema:
            type: integer
            example: 5
          examples:
            default:
              value: 5
        - name: offset
          in: query
          description: >-
            Provide the record offset for records being returned. This is how
            you retrieve records on additional pages (default is 0)
          required: false
          style: form
          explode: true
          schema:
            type: integer
            example: 0
          examples:
            default:
              value: 0
      responses:
        '200':
          description: |-
            {
                count: (this is the total number of pin job records that exist for the query filters you passed in),
                rows: [
                    {
                        id: (the id for the pin job record),
                        ipfs_pin_hash: (the IPFS multi-hash for the content you pinned),
                        date_queued: (The date this hash was initially queued to be pinned - represented in ISO 8601 format),
                        status: (The current status for the pin job),
                        name: (If you passed in a name for your hash, it will be listed here),
                        keyvalues: (If you passed in keyvalues for your hash, they will be listed here),
                        host_nodes: (If you provided host nodes for your hash, they will be listed here),
                        pin_policy: Once this content has been found, this is the pin policy that will be used for replications
                    },
                    {
                        same record format as above
                    }
                    .
                    .
                    .
                ]
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_3'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/hashMetadata:
    put:
      summary: Update File Metadata
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ipfsPinHash:
                  type: string
                  description: CID for the file to be updated
                name:
                  type: string
                  description: Updated name for file
                keyvalues:
                  type: object
                  additionalProperties: true
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
                example: OK
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /pinning/unpin/{CID}:
    delete:
      summary: Delete File (Unpin)
      description: Delete a file by CID
      parameters:
        - name: CID
          in: path
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
                example: OK
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /data/userPinnedDataTotal:
    get:
      summary: Data Usage
      description: Retrieve your current data usage for your Pinata account
      responses:
        '200':
          description: |-
            {
                "pin_count": "TOTAL FILES PINNED",
                "pin_size_total": "TOTAL SIZE IN BYTES OF ALL FILES"
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_4'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /data/pinList:
    get:
      summary: List Files
      description: List all the files on your Pinata account
      parameters:
        - name: includeCount
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: boolean
            example: false
          examples:
            default:
              value: false
        - name: cid
          in: query
          description: CID of file you are searching for
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: groupId
          in: query
          description: Filters by group id if applicable
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pinStart
          in: query
          description: >-
            ISO_8601 format date to filter by start date for when file was
            pinned
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pinEnd
          in: query
          description: ISO_8601 format date to filter by end date for when file was pinned
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: unpinStart
          in: query
          description: >-
            ISO_8601 format date to filter by start date for when file was
            unpinned
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: unpinEnd
          in: query
          description: >-
            ISO_8601 format date to filter by end date for when file was
            unpinned
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pinSizeMin
          in: query
          description: Minimum size in bytes of files to return
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pinSizeMax
          in: query
          description: Maximum size in bytes of files to return
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: status
          in: query
          description: Options are "all", "pinned", or "unpinned"
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pageLimit
          in: query
          description: Maximum number of files to return. Default is 10, max is 1000
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: pageOffset
          in: query
          description: Use to paginate through files, default is 0
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: metadata
          in: query
          description: See metadata querying section below
          required: false
          style: form
          explode: true
          schema:
            type: string
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  rows:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        ipfs_pin_hash:
                          type: string
                        size:
                          type: integer
                        user_id:
                          type: string
                          format: uuid
                        date_pinned:
                          type: string
                          format: date-time
                        date_unpinned:
                          type: string
                          format: date-time
                          nullable: true
                        metadata:
                          type: object
                          properties:
                            name:
                              type: string
                            keyvalues:
                              type: object
                              additionalProperties:
                                type: integer
                        regions:
                          type: array
                          items:
                            type: object
                            properties:
                              regionId:
                                type: string
                              currentReplicationCount:
                                type: integer
                              desiredReplicationCount:
                                type: integer
                        mime_type:
                          type: string
                          nullable: true
                        number_of_files:
                          type: integer
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /users/generateApiKey:
    post:
      summary: Generate Pinata API Key
      description: Create a Pinata API key
      requestBody:
        description: 'Body is comprised of keyName, permissions, and maxUses (optional). '
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/users_generateApiKey_body'
      responses:
        '200':
          description: |-
            {
                "pinata_api_key": "KEY",
                "pinata_api_secret": "SECRET",
                "JWT": "JWT"
            }
          content:
            application/json: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/inline_response_200_6'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /users/apiKeys:
    get:
      summary: List API Keys
      description: List all API keys for your account
      responses:
        '200':
          description: |-
            {
                "keys": [
                    {
                        "id": "string",
                        "name": "string",
                        "key": "string",
                        "secret": "string",
                        "max_uses": number,
                        "uses": number,
                        "user_id": "string",
                        "scopes": {
                            "admin": true
                        },
                        "revoked": false,
                        "createdAt": "2022-06-01T16:25:08.473Z",
                        "updatedAt": "2022-06-01T16:25:08.473Z"
                    }
                ],
                "count": 1
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_7'
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
  /users/revokeApiKey:
    put:
      summary: Revoke API Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/users_revokeApiKey_body'
      responses:
        '200':
          description: '"Revoked"'
          content:
            application/json: {}
      security:
        - bearerAuth: []
      servers:
        - url: https://api.pinata.cloud
components:
  schemas:
    inline_response_200:
      type: object
      properties:
        message:
          type: string
      x-examples:
        Example 1:
          message: Congratulations! You are communicating with the Pinata API!
    pinning_pinFileToIPFS_body:
      required:
        - file
      type: object
      properties:
        file:
          type: string
          format: binary
        pinataMetadata:
          $ref: '#/components/schemas/pinning_pinFileToIPFS_body_pinataMetadata'
        pinataOptions:
          $ref: '#/components/schemas/pinning_pinFileToIPFS_body_pinataOptions'
    inline_response_200_1:
      type: object
      properties:
        IpfsHash:
          type: string
        PinSize:
          type: integer
        Timestamp:
          type: string
        isDuplicate:
          type: boolean
      x-examples:
        Example 1:
          IpfsHash: QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng
          PinSize: 32942
          Timestamp: 2023-06-16T17:24:37.998Z
          isDuplicate: true
    pinning_pinJSONToIPFS_body:
      required:
        - pinataContent
      type: object
      properties:
        pinataContent:
          type: object
          description: The JSON content to pin
        pinataOptions:
          $ref: '#/components/schemas/pinning_pinJSONToIPFS_body_pinataOptions'
        pinataMetadata:
          $ref: '#/components/schemas/pinning_pinJSONToIPFS_body_pinataMetadata'
    pinning_pinByHash_body:
      required:
        - hashToPin
      type: object
      properties:
        hashToPin:
          type: string
          description: The CID of the file you want to pin to Pinata
          example: CID
        pinataOptions:
          type: object
          properties:
            groupId:
              type: string
            hostNodes:
              type: array
              items:
                type: string
        pinataMetadata:
          type: object
          properties:
            name:
              type: string
            keyvalues:
              type: object
              additionalProperties: true
    inline_response_200_2:
      type: object
      properties:
        id:
          type: string
        ipfsHash:
          type: string
        status:
          type: string
        name:
          type: string
      x-examples:
        Example 1:
          id: 4277506a-80c1-4d37-bc8e-afd09ead9da7
          ipfsHash: bafkreihbuc7yg6u3u55dsky6wqnccx6cvmwwuoeeh77bwgrvo3zofqtkdy
          status: prechecking
          name: MyCustomName
    inline_response_200_3:
      type: object
      properties:
        count:
          type: integer
        rows:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_3_rows'
      x-examples:
        Example 1:
          count: 4
          rows:
            - id: 08b7a1aa-52a0-4154-b0ff-3735988e4df7
              ipfs_pin_hash: QmQiqjxxgwSEZzyUoWsSD8m5zEhFZdAWTM7QZv88iYQzNQ
              date_queued: 2023-05-26T21:16:08.205Z
              name: OG EQB ART API Upload
              status: expired
              host_nodes:
                - >-
                  /ip4/127.0.0.1/tcp/4001/p2p/12D3KooWJHeyQxbbJ4VzqLqa2ufo9KPWsjxPFzzRgheZtwiJe7gc
                - >-
                  /ip4/192.168.100.71/tcp/4001/p2p/12D3KooWJHeyQxbbJ4VzqLqa2ufo9KPWsjxPFzzRgheZtwiJe7gc
              pin_policy:
                regions:
                  - id: US-EAST-1
                    desiredReplicationCount: 1
                version: 1
            - id: 4927d14c-b4b3-4c6e-88ea-83f3afb1885b
              ipfs_pin_hash: QmU2trVdrKBPsSZxCzzxDUa7HVTf8H2G8v5Ec7tMp7zdZF
              date_queued: 2023-06-12T20:26:55.472Z
              name: Pin by CID Test
              status: expired
              pin_policy:
                regions:
                  - id: US-EAST-1
                    desiredReplicationCount: 1
                version: 1
            - id: 19d89d6a-6c7b-4156-bb6a-d37b30387e72
              ipfs_pin_hash: QmNgrsbHv4kxwbp4zWvFVAJf1wJTL6YismJccZwi2MoiYc
              date_queued: 2023-06-20T01:04:01.825Z
              name: OG EQB ART API Upload
              status: expired
              host_nodes:
                - >-
                  /ip4/192.168.100.71/tcp/4001/p2p/12D3KooWJHeyQxbbJ4VzqLqa2ufo9KPWsjxPFzzRgheZtwiJe7gc
              pin_policy:
                regions:
                  - id: US-EAST-1
                    desiredReplicationCount: 1
                version: 1
            - id: c9e74c33-ce62-4b11-a3f4-bb5142d6ff3d
              ipfs_pin_hash: bafybeiapgnfykc7dyfly3tagyqk3hctmrwibq5bevdwlnywo7dyfznbqaa
              date_queued: 2023-07-07T19:31:37.485Z
              name: MyCustomName
              status: searching
              keyvalues:
                customKey: customValue
                customKey2: customValue2
              pin_policy:
                regions:
                  - id: US-EAST-1
                    desiredReplicationCount: 1
                version: 1
    inline_response_200_3_rows:
      type: object
      properties:
        id:
          type: string
        ipfs_pin_hash:
          type: string
        date_queued:
          type: string
        name:
          type: string
        status:
          type: string
        keyvalues:
          nullable: true
        host_nodes:
          type: array
          nullable: true
          items:
            type: string
        pin_policy:
          $ref: '#/components/schemas/inline_response_200_3_pin_policy'
    inline_response_200_3_pin_policy:
      type: object
      properties:
        regions:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_3_pin_policy_regions'
        version:
          type: integer
    inline_response_200_3_pin_policy_regions:
      type: object
      properties:
        id:
          type: string
        desiredReplicationCount:
          type: integer
    pinning_hashMetadata_body:
      required:
        - ipfsPinHash
      type: object
      properties:
        ipfsPinHash:
          type: string
          description: CID for file where you want to update metadata
          example: QmTYTVXrHeePozENTRMApK621NFdVac9vbp6k4BeiMFtwm
        name:
          type: string
          description: Name for the file
          example: Another test
        keyvalues:
          type: string
          description: Stringified object key value pairs
    inline_response_200_4:
      type: object
      properties:
        pin_count:
          type: integer
        pin_size_total:
          type: integer
        pin_size_with_replications_total:
          type: integer
      x-examples:
        Example 1:
          pin_count: 15610
          pin_size_total: 60686749507
          pin_size_with_replications_total: 60686749507
    inline_response_200_5:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_5_rows'
      x-examples:
        Example 1:
          rows:
            - id: 3433373a-05c0-4bb4-8292-82da15269728
              ipfs_pin_hash: bafkreidjj3s4c3hszh2uxhly767eomkudvjm26wk6efd5nael5uld53ela
              size: 113605
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-07T17:33:19.774Z
              metadata:
                name: Test file
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 5a5fd09c-25c9-4bcf-802c-88a7787567a0
              ipfs_pin_hash: QmTYTVXrHeePozENTRMApK621NFdVac9vbp6k4BeiMFtwm
              size: 113619
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-07T17:32:38.607Z
              metadata:
                name: Test file
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 60dacaf1-d856-4596-b7af-6ba977f6bf2a
              ipfs_pin_hash: QmUPNNYkHqxEtgGrT3FkwQSBNtqumP246amx39gqpsY36A
              size: 126885272
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-07T15:40:48.001Z
              metadata:
                name: Submarine Analytics.mp4
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 2e8e4dd5-824c-4cdc-9036-4b99b1e4b595
              ipfs_pin_hash: QmUPNNYkHqxEtgGrT3FkwQSBNtqumP246amx39gqpsY36A
              size: 126885272
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-07T14:36:12.054Z
              date_unpinned: 2023-07-07T14:37:41.352Z
              metadata:
                name: Submarine Analytics.mp4
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: b0d9cec4-34bf-4ab1-95ff-602df06283d4
              ipfs_pin_hash: QmR9fYg4aYk3Av89a4ZMucxzawFbesjdjtsNvDGMcCVkYD
              size: 363
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T17:35:49.021Z
              metadata:
                name: metadata.json - Generative Art Metadata
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 547107a8-22c4-4370-8422-331eb3d99216
              ipfs_pin_hash: Qmb4mmUihw51hmzCJgFL5BuiUm4QdvBYeeUjKeDbn9pVxD
              size: 1787358
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T17:33:02.324Z
              metadata:
                name: Generative Art Image
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: f26f6bda-d1e9-4a7d-b49d-87733d47828d
              ipfs_pin_hash: Qma6sZ1NQUHNYj1fEc5ynrpzxHd2uPfqn8UUwHVD6Duogh
              size: 1982
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T17:32:13.605Z
              metadata:
                name: index.html - Generative Art
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 75b94103-5824-48e4-a662-3ccfcc50baa9
              ipfs_pin_hash: QmYAxg2f6wPs2EVsXU619EdraTpNvcDh685b3hC7tp2s2f
              size: 286624048
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T15:14:25.588Z
              metadata:
                name: docs demo.mp4
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: be0d10f3-f8ea-4a46-bb35-624c24a5e543
              ipfs_pin_hash: QmXPVRxNxL1iPxpm82VHTAHgxQoDCoTYbMpsndTnmsXM3i
              size: 509495389
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T14:26:00.083Z
              date_unpinned: 2023-07-05T15:15:45.940Z
              metadata:
                name: VSCodeVim.mp4
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
            - id: 7bc673d8-ecc8-4943-905a-ac276fcbd092
              ipfs_pin_hash: QmeqpNhh6fuvU2Guykivw49JLcyvPUVw4PoHc6RSCMGfB2
              size: 1469677
              user_id: ec50a085-a746-428d-b01d-167ac379fbd4
              date_pinned: 2023-07-05T13:31:49.754Z
              date_unpinned: 2023-07-05T15:24:46.957Z
              metadata:
                name: Barge Steve
              regions:
                - regionId: pinata
                  currentReplicationCount: 1
                  desiredReplicationCount: 1
    inline_response_200_5_rows:
      type: object
      properties:
        id:
          type: string
        ipfs_pin_hash:
          type: string
        size:
          type: integer
        user_id:
          type: string
        date_pinned:
          type: string
        date_unpinned:
          type: string
          nullable: true
        metadata:
          $ref: '#/components/schemas/inline_response_200_5_metadata'
        regions:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_5_regions'
    inline_response_200_5_metadata:
      type: object
      properties:
        name:
          type: string
        keyvalues:
          nullable: true
    inline_response_200_5_regions:
      type: object
      properties:
        regionId:
          type: string
        currentReplicationCount:
          type: integer
        desiredReplicationCount:
          type: integer
    users_generateApiKey_body:
      required:
        - keyName
        - permissions
      type: object
      properties:
        keyName:
          type: string
        permissions:
          $ref: '#/components/schemas/usersgenerateApiKey_permissions'
        maxUses:
          type: integer
      x-examples:
        Example 1:
          keyName: Required name for your key
          maxUses: 0
          permissions:
            admin: false
            endpoints:
              data:
                pinList: false
                userPinnedDataTotal: false
              pinning:
                hashMetadata: false
                hashPinPolicy: false
                pinByHash: false
                pinFileToIPFS: false
                pinJSONToIPFS: false
                pinJobs: false
                unpin: false
                userPinPolicy: false
    usersgenerateApiKey_permissions:
      type: object
      properties:
        admin:
          type: boolean
        endpoints:
          $ref: '#/components/schemas/usersgenerateApiKey_permissions_endpoints'
    usersgenerateApiKey_permissions_endpoints:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/usersgenerateApiKey_permissions_endpoints_data'
        pinning:
          $ref: >-
            #/components/schemas/usersgenerateApiKey_permissions_endpoints_pinning
    usersgenerateApiKey_permissions_endpoints_data:
      type: object
      properties:
        pinList:
          type: boolean
        userPinnedDataTotal:
          type: boolean
    usersgenerateApiKey_permissions_endpoints_pinning:
      type: object
      properties:
        hashMetadata:
          type: boolean
        hashPinPolicy:
          type: boolean
        pinByHash:
          type: boolean
        pinFileToIPFS:
          type: boolean
        pinJSONToIPFS:
          type: boolean
        pinJobs:
          type: boolean
        unpin:
          type: boolean
        userPinPolicy:
          type: boolean
    inline_response_200_6:
      type: object
      properties:
        pinata_api_key:
          type: string
        pinata_api_secret:
          type: string
        JWT:
          type: string
      x-examples:
        Example 1:
          pinata_api_key: KEY
          pinata_api_secret: SECRET
          JWT: JWT
    inline_response_200_7:
      type: object
      properties:
        keys:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_7_keys'
        count:
          type: integer
      x-examples:
        Example 1:
          keys:
            - id: string
              name: string
              key: string
              secret: string
              max_uses: 0
              uses: 1
              user_id: string
              scopes:
                admin: true
              revoked: false
              createdAt: 2022-06-01T16:25:08.473Z
              updatedAt: 2022-06-01T16:25:08.473Z
          count: 1
    inline_response_200_7_keys:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        key:
          type: string
        secret:
          type: string
        max_uses:
          type: integer
        uses:
          type: integer
        user_id:
          type: string
        scopes:
          $ref: '#/components/schemas/inline_response_200_7_scopes'
        revoked:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
    inline_response_200_7_scopes:
      type: object
      properties:
        admin:
          type: boolean
    users_revokeApiKey_body:
      required:
        - apiKey
      type: object
      properties:
        apiKey:
          type: string
      x-examples:
        Example 1:
          apiKey: API KEY TO REVOKE
    pinning_pinFileToIPFS_body_pinataMetadata:
      type: object
      properties:
        name:
          type: string
        keyvalues:
          type: object
      description: Optional stringified object
      example: '{"name":"Test file"}'
    pinning_pinFileToIPFS_body_pinataOptions:
      type: object
      properties:
        cidVersion:
          type: number
        groupId:
          type: string
      description: Optional stringified object
      example: '{"cidVersion":0}'
    pinning_pinJSONToIPFS_body_pinataOptions:
      type: object
      properties:
        groupId:
          type: string
        cidVersion:
          type: number
      description: Optional Pinata Options Object
    pinning_pinJSONToIPFS_body_pinataMetadata:
      type: object
      properties:
        name:
          type: string
        keyvalues:
          type: object
      description: Optional Pinata Metadata object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
