API Reference

A full reference of how to interact with our API correctly. If you're new, we recommend reading the quick start guide first.

If you're interacting with our API using Node.js, we recommend our Node.js client.

Supported Memes Anchor

Below is a list of all the memes we currently support. You can select one with memeIndex, see Create a Deployment.

  1. Rickroll
  2. Gnomed
  3. Epic Sax Guy
  4. Bustin
  5. All Star
  6. Hit or Miss
  7. Ricardo
  8. Sexy Sax Guy
  9. Men in Black
  10. Chocolate Rain
  11. Crab Rave
  12. Shooting Stars
  13. Wow
  14. Fortnite Dance
  15. Stoopid
  16. FBI Open Up
  17. Oh Yeah Yeah

Get API Key Anchor

Endpoint: /api/key/get

Method: POST

Body format: JSON

Required params:
  • username: String
  • password: String

Example response:

{
  key: 'xxx'
}

Revoke & Regenerate API Key Anchor

Warning! This will cause all programs still using your old API key to stop working.

Endpoint: /api/key/regen

Method: POST

Body format: JSON

Required params:
  • username: String
  • password: String

Example response:

{
  key: 'yyy'
}

Create a Deployment Anchor

Endpoint: /api/deployments/create

Method: POST

Body format: JSON

Required params:
  • key: String
Optional params:
  • memeIndex: Number

Example response:

{
  code: 'I9htyZS8N',
  uri: 'https://raas.now.sh/d/I9htyZS8N'
}

List Deployments Anchor

Endpoint: /api/deployments/list

Method: POST

Body format: JSON

Required params:
  • key: String
Optional params:
  • memeIndex: Number

Example response:

{
  deployments: [
    {
      code: 'I9htyZS8N',
      memeIndex: 0,
      views: 1
    }
  ],
  count: 1
}

Get Deployment Info Anchor

Endpoint: /api/deployments/info

Method: POST

Body format: JSON

Required params:
  • key: String
  • code: String

Example response:

{
  memeIndex: 0,
  memeUri: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
  memeName: 'Rickroll',
  views: 1,
  uri: 'https://raas.now.sh/d/I9htyZS8N'
}

View a Deployment Anchor

Warning! Note that a deployment's view count is automatically incremented every time it's visited.

Endpoint: /api/deployments/view

Method: POST

Body format: JSON

Required params:
  • key: String
  • code: String

Example response:

{
  views: 2
}

Delete a Deployment Anchor

Endpoint: /api/deployments/delete

Method: DELETE

Body format: JSON

Required params:
  • key: String
  • code: String

Example response:

{
  finalViews: 2
}

Create/Update an Alias Anchor

Endpoint: /api/aliases/alias

Method: POST

Body format: JSON

Required params:
  • key: String
  • code: String
  • alias: String

Example response:

{
  uri: 'https://raas.now.sh/a/xxx'
}

If the alias doesn't exist, it'll be created, but if it does it'll be updated with the new code.

List Aliases Anchor

Endpoint: /api/aliases/list

Method: POST

Body format: JSON

Required params:
  • key: String
Optional params:
  • code: String

Example response:

{
  [
    {
      alias: 'xxx',
      code: 'I9htyZS8N'
    }
  ],
  count: 1
}

Get Alias Info Anchor

Endpoint: /api/aliases/info

Method: POST

Body format: JSON

Required params:
  • key: String
  • alias: String

Example response:

{
  code: 'I9htyZS8N',
  uri: 'https://raas.now.sh/a/xxx'
}

Delete an Alias Anchor

Endpoint: /api/aliases/delete

Method: DELETE

Body format: JSON

Required params:
  • key: String
  • alias: String

Example response:

{
  code: 'I9htyZS8N'
}

Errors Anchor

This section documents all the possible error responses you can get.

Response code 401

{
  error: 'Username or password not specified'
}

Response code 401

{
  error: 'Incorrect password'
}

Response code 401

{
  error: 'User does not exist'
}

Response code 401

{
  error: 'API key not specified'
}

Response code 404

{
  error: 'Meme not found'
}

Response code 401

{
  error: 'Invalid API key'
}

Response code 400

{
  error: 'Code not specified'
}

Response code 404

{
  error: 'Deployment not found'
}

Response code 403

{
  error: 'You are not the owner of that deployment'
}

Response code 400

{
  error: 'Alias or code not specified'
}

Response code 400

{
  error: 'Invalid alias, must match regex /.../'
}

Response code 403

{
  error: 'You are not the owner of that alias'
}

Response code 400

{
  error: 'Alias not specified'
}

Response code 500

{
  error: 'We messed up'
}