Current User Teachable Account API

getting an account profile response

GET /v1/current_user/profile

Parameters

Name Description
school_id school_id
id id

Request

Headers

Accept: application/json

Route

GET /v1/current_user/profile?school_id=1

Query Parameters

school_id: 1

cURL

curl "http://localhost:3000/v1/current_user/profile?school_id=1" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Client-Token: mobile" \
	-H "Sso-Token: YqjXjdLxgZkGPkDAv1V_" \
	-H "Host: api.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2930

Status

200 OK

Body

{
  "account": {
    "id": 1,
    "email": "teachable-account-0@example.com",
    "name": "Teachable Account Owner",
    "created_at": "2019-10-31T21:58:13Z",
    "updated_at": "2019-10-31T21:58:13Z",
    "gravatar_url": "https://s.gravatar.com/avatar/a22ae55dcd7e5729d12e1dce36d9108a?d=mm",
    "users": [
      {
        "id": 1,
        "school_id": 1,
        "email": "user-0@example.com",
        "name": "User Name",
        "gravatar_url": "https://s.gravatar.com/avatar/5f9770e6c24be5645e12384e284860bf?d=mm",
        "created_at": "2019-10-31T21:58:13Z",
        "updated_at": "2019-10-31T21:58:13Z",
        "courses": [
          {
            "id": 1,
            "name": "Free Course",
            "friendly_url": "friendly-url-0",
            "heading": "Course Heading",
            "description": "Course Description",
            "image_url": "https://assets.teachablecdn.com/icons/default-course-image.png",
            "hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
            "author_bio": {
              "created_at": "2019-10-31T21:58:13Z",
              "headline": "MyText",
              "profile_image_url": "http://www.example.com",
              "bio": "MyText",
              "position": null,
              "user_id": null,
              "name": "Author Name",
              "id": 1,
              "meta": {
                "class": "authorbio",
                "url": "/author_bios/1",
                "name": "Author Name",
                "description": "",
                "image_url": null
              }
            },
            "created_at": "2019-10-31T00:00:00Z",
            "updated_at": "2019-10-31T21:58:15Z"
          },
          {
            "id": 2,
            "name": "Paid Course",
            "friendly_url": "friendly-url-1",
            "heading": "Course Heading",
            "description": "Course Description",
            "image_url": "https://assets.teachablecdn.com/icons/default-course-image.png",
            "hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
            "author_bio": {
              "created_at": "2019-10-31T21:58:15Z",
              "headline": "MyText",
              "profile_image_url": "http://www.example.com",
              "bio": "MyText",
              "position": null,
              "user_id": null,
              "name": "Author Name",
              "id": 2,
              "meta": {
                "class": "authorbio",
                "url": "/author_bios/2",
                "name": "Author Name",
                "description": "",
                "image_url": null
              }
            },
            "created_at": "2019-10-31T00:00:00Z",
            "updated_at": "2019-10-31T21:58:15Z"
          }
        ],
        "enrollments": [
          {
            "id": 1,
            "course_id": 1,
            "user_id": 1,
            "created_at": "2019-10-31T21:58:15Z",
            "updated_at": "2019-10-31T21:58:15Z",
            "enrolled_at": "2019-10-31T21:58:15Z",
            "is_active": true,
            "has_full_access": false,
            "percent_complete": 0,
            "completed_at": null,
            "responses": [

            ]
          },
          {
            "id": 2,
            "course_id": 2,
            "user_id": 1,
            "created_at": "2019-10-31T21:58:15Z",
            "updated_at": "2019-10-31T21:58:15Z",
            "enrolled_at": "2019-10-31T21:58:15Z",
            "is_active": true,
            "has_full_access": false,
            "percent_complete": 0,
            "completed_at": null,
            "responses": [

            ]
          }
        ],
        "school": {
          "id": 1,
          "email": "school-0@example.com",
          "name": "School 0",
          "heading": "example heading",
          "description": "school description",
          "facebook_username": "school0",
          "twitter_username": "school1",
          "is_launched": true,
          "hubspot_id": null,
          "created_at": "2019-10-31T21:58:13Z",
          "updated_at": "2019-10-31T21:58:15Z",
          "customization": {
            "favicon_url": null,
            "background_image_url": null,
            "site_logo_url": null,
            "brand_primary": null,
            "brand_secondary": null,
            "brand_success": null,
            "brand_warning": null,
            "brand_danger": null,
            "brand_info": null,
            "brand_text": null,
            "brand_heading": null,
            "brand_navbar_text": null,
            "is_customized": false,
            "brand_video_player_color": null
          },
          "primary_domain": null
        }
      }
    ]
  }
}