POST
/
class.json
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: c95dbdc9c72cc8e7f2367d7ef2c6d99c5e013233" \
-d '{  
  "name":"UserCustomProfile",
  "fields":{  
    "name":"String",
    "last_name":"String",
    "age":"Integer",
    "tags":"String_a"
  },
  "permissions":{  
    "create":{  
      "access":"open"
    },
    "read":{  
      "access":"not_allowed"
    },
    "update":{  
      "access":"open_for_users_ids",
      "ids":"1,2"
    }
  }
}' \
https://api.quickblox.com/class.json
{
  "_id": "5ddfb849a0eb4725dfc9b0ad",
  "acl": {
    "read": {
      "access": "not_allowed"
    },
    "update": {
      "access": "open_for_users_ids",
      "users_ids": [
        "1",
        "2"
      ]
    },
    "delete": {
      "access": "owner"
    },
    "create": {
      "access": "open",
      "primary": true
    }
  },
  "application_id": 78387,
  "custom_fields": [
    {
      "name": "name",
      "type": "String"
    },
    {
      "name": "last_name",
      "type": "String"
    },
    {
      "name": "age",
      "type": "Integer"
    },
    {
      "is_array": "1",
      "name": "tags",
      "type": "String"
    }
  ],
  "name": "UserCustomProfile",
  "user_id": 91103344
}

Recipes

Body Parameters

name
string
required
Custom class name.
fields
object

Custom class fields with types.
Format: fields.{custom_field}=<field_type>.

Headers

QB-Token
string
required
A user or application session token. See our Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.

Responses

curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: c95dbdc9c72cc8e7f2367d7ef2c6d99c5e013233" \
-d '{  
  "name":"UserCustomProfile",
  "fields":{  
    "name":"String",
    "last_name":"String",
    "age":"Integer",
    "tags":"String_a"
  },
  "permissions":{  
    "create":{  
      "access":"open"
    },
    "read":{  
      "access":"not_allowed"
    },
    "update":{  
      "access":"open_for_users_ids",
      "ids":"1,2"
    }
  }
}' \
https://api.quickblox.com/class.json
{
  "_id": "5ddfb849a0eb4725dfc9b0ad",
  "acl": {
    "read": {
      "access": "not_allowed"
    },
    "update": {
      "access": "open_for_users_ids",
      "users_ids": [
        "1",
        "2"
      ]
    },
    "delete": {
      "access": "owner"
    },
    "create": {
      "access": "open",
      "primary": true
    }
  },
  "application_id": 78387,
  "custom_fields": [
    {
      "name": "name",
      "type": "String"
    },
    {
      "name": "last_name",
      "type": "String"
    },
    {
      "name": "age",
      "type": "Integer"
    },
    {
      "is_array": "1",
      "name": "tags",
      "type": "String"
    }
  ],
  "name": "UserCustomProfile",
  "user_id": 91103344
}