ROMs

    EndpointDescription
    POST /v1/romsUpload a ROM
    GET /v1/romsGet ROM
    DELETE /v1/romsDelete ROM

    POST /v1/roms

    Upload a ROM

    ⚠️ Only 1 ROM may be uploaded at a time. After a successful upload, subsequent uploads will fail unless the ROM is deleted.

    Request Parameters

    Location Name Type Required? Description
    body <raw> binary ✔️ Game Boy ROM.

    Example Request

    Header:

    POST /v1/roms
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    <raw>

    Response Parameters

    Name Type Description
    data object
    data.id string ROM ID.
    data.type string Type of resource. Must be "roms".
    data.attributes object
    data.attributes.name string Name in ROM header.
    data.attributes.hash string ROM hash. (MD5)
    data.attributes.valid bool True if valid Pokémon Gen 1 ROM, false if not.
    data.links object
    data.links.self string Link to current resource.
    links object
    links.self string Link to current resource.

    Example Response

    Headers:

    HTTP/1.1 201 Created
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    ETag: w/"abcdef0123456789abcdef0123456789"
    

    Body:

    {
        "data": {
            "id": "1337",
            "type": "roms",
            "attributes": {
                "name": "POKEMON RED",
                "hash": "3d45c1ee9abd5738df46d2bdda8b57dc",
                "valid": true
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/roms"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/roms"
        }
    }
    

    GET /v1/roms

    Get ROM

    ⚠️ There is no way to download a ROM that has been uploaded. See the Disclaimer for the reasons why.

    Request Parameters

    None

    Example Request

    Header:

    GET /v1/roms
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    

    Body:

    None

    Response Parameters

    Name Type Description
    data object
    data.id string ROM ID.
    data.type string Type of resource. Must be "roms".
    data.attributes object
    data.attributes.name string Name in ROM header.
    data.attributes.hash string ROM hash. (MD5)
    data.attributes.valid bool True if valid Pokémon Gen 1 ROM, false if not.
    data.links object
    data.links.self string Link to current resource.
    links object
    links.self string Link to current resource.

    Example Response

    Headers:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    ETag: w/"abcdef0123456789abcdef0123456789"
    

    Body:

    {
        "data": {
            "id": "1337",
            "type": "roms",
            "attributes": {
                "name": "POKEMON RED",
                "hash": "3d45c1ee9abd5738df46d2bdda8b57dc",
                "valid": true
            },
            "links": {
                "self": "https://api.pkmnapi.com/v1/roms"
            }
        },
        "links": {
            "self": "https://api.pkmnapi.com/v1/roms"
        }
    }
    

    DELETE /v1/roms

    Deletes ROM

    Request Parameters

    Location Name Type Required? Description
    header If-Match string ✔️ ETag of resource.

    Example Request

    Header:

    DELETE /v1/roms
    Host: api.pkmnapi.com
    Authorization: Bearer <access_token>
    If-Match: w/"abcdef0123456789abcdef0123456789"
    

    Body:

    None

    Response Parameters

    None

    Example Response

    Headers:

    HTTP/1.1 204 No Content
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    None