- Authentication
- Requests
- Create User
- Authenticate User
- Forget User’s authentication token
- Update User
- Show User
- Follow User
- Unfollow User
- Search Users
- List followers
- List followees
- Create Post
- Update Post
- Destroy Post
- List Posts
- Get What’s new feed
- List Posts of a user
- Like Post
- Unlike Post
- List Post likers
- Save Post
- Unsave Post
- List saved posts
- List posts where specific user where tagged
- Create comment
- Update comment
- Delete comment
- Data types
SpeakCoding Instagram API conforms to JSON:API standard.
Clients get authentication token in response to Create User and Authenticate User requests. They MUST include this token with all requests to the API by using Authentication-Token
header.
POST /users.json
Client MUST NOT be authenticated.
Parameters: all User data type parameters and additional password
parameter for password. Namespaced with user
.
Response
User structure. Meta contains authentication_token
to use for authentication.
POST /users/authenticate.json
Client MUST NOT be authenticated.
Parameters: user[email]
and user[password]
.
Response
Same as for [Create user], but for given user.
POST /users/forget.json
Client MUST be authenticated.
Response
Blank object {}
.
PUT /users/:id.json
Client MUST be authenticated and can only update it’s own user.
Parameters: all User data type parameters.
Response
Updated User structure.
POST /users/:id/follow.json
Client MUST be authenticated and MUST NOT follow itself.
Response
Updated User structure of a followee.
POST /users/:id/unfollow.json
Client MUST be authenticated and MUST NOT unfollow itself.
Response
Updated User structure of an unfollowee.
GET /users/search.json
Parameters: query
(search query).
Response
List of User structures. Top 10 search results.
GET /users/:id/followers.json
Client MUST be authenticated.
Response
List of User structures of a followers.
GET /users/:id/followees.json
Client MUST be authenticated.
Response
List of User structures of a followees.
POST /posts.json
Client MUST be authenticated.
Parameters: Post data type parameters namespaced with post
.
Response
Post structure.
PUT /posts/:id.json
Client MUST be authenticated.
Parameters: Post data type parameters namespaced with post
.
Response
Post structure.
DELETE /posts/:id.json
Client MUST be authenticated.
Response
Post structure of recently deleted post.
GET /posts/tagged.json
Client MUST be authenticated.
Parameters:
Attribute name | Type | Description |
---|---|---|
user_id |
Integer? |
ID of tagged user. If not provided, current user will be picked. |
Response
List of Post structures.
POST /comments.json
Client MUST be authenticated.
Parameters:
Attribute name | Type | Description |
---|---|---|
comment[post_id] |
Integer |
Post ID |
comment[text] |
String |
Comment text |
Response
New Comment structure.
PUT /comments/:id.json
Client MUST be authenticated.
Parameters:
Attribute name | Type | Description |
---|---|---|
comment[text] |
String |
Comment text |
Response
Updated Comment structure.
Delete /comments/:id.json
Client MUST be authenticated.
Response
Deleted Comment structure (state before deletion).
Attribute name | Type | Description |
---|---|---|
id |
Integer |
Identificator of a user |
String |
Email address |
|
user_name |
String? |
User name |
bio |
String? |
Biography |
profile_picture |
String |
Userpic URL |
posts_count |
Integer |
Total number of user’s posts |
followers_count |
Integer |
Total number of user’s followers |
followees_count |
Integer |
Total number of user’s followees |
is_follower |
Boolean |
Is this user a follower of the current user? |
is_followee |
Boolean |
Is this user a followee of the current user? |
Attribute name | Type | Description |
---|---|---|
id |
Integer |
Identificator of a post |
location |
String? |
Location (example: "New York Central Park") |
caption |
String? |
First post comment of post creator |
image |
String |
Post image URL |
user |
Creator of post structure |
|
likes_count |
Integer |
Total number of likes for this post |
liked |
Boolean |
Was this post liked by current user? |
liker_followee |
Followee of a current user that liked this post |
|
saved |
Boolean |
Was this post saved by current user? |
created_at |
Integer |
UNIX timestamp of Post creation |
tags |
Array of Tag structures |
Tags of people on the photo |
comments |
Array of Comment structures |
Ordered array of post comments |
Attribute name | Type | Description |
---|---|---|
id |
Integer |
Comment ID |
user |
Comment creator |
|
text |
String |
Comment text |
created_at |
Integer |
UNIX timestamp of Comment creation |
Attribute name | Type | Description |
---|---|---|
user |
Tagged user |
|
top |
Float |
Tag offfset from top (0.0..1.0) |
left |
Float |
Tag offfset from left (0.0..1.0) |