API reference
Sleep record by ID
Retrieve specific sleep record with record id
GET
Request
Response
Header Parameters
Authorization
String
required
Provide your bearer token in the Authorization header when making requests to protected resources.
Body Parameters
sleep_id
String
required
Sleep ID
Curl
1curl --request GET \
2 --url https://app-api.spikeapi.com/v3/queries/sleeps/{sleep_id} \
3 --header 'Accept: application/json, application/problem+json' \
4 --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5OTk5OSIsInN1YiI6ImE5ZjU3ODAzMGIxYThkYWUifQ.DJhTPUc7gAkK03rtFQxuFJzRBNpfWjgVJnFU7YUY4A4'
Responses
200
1{
2 "from": "2025-03-13T00:00:00Z",
3 "to": "2025-03-14T00:00:00Z",
4 "timezone": "Europe/London",
5 "sleeps": [
6 {
7 "record_id": "0134fec9-6e89-8b50-a3c8-345825de3809",
8 "modified_at": "2025-03-14T05:28:00Z",
9 "start_at_timestamp": "2025-03-13T19:30:00Z",
10 "end_at_timestamp": "2025-03-14T05:28:00Z",
11 "duration": 35880000,
12 "user_time_offset_minutes": 120,
13 "input_method": "device",
14 "metrics": {
15 "sleep_duration": 35880000,
16 "sleep_duration_deep": 6120000,
17 "sleep_duration_light": 20520000,
18 "sleep_duration_rem": 9240000,
19 "sleep_duration_awake": 180000,
20 "sleep_interruptions": 2,
21 "sleep_breathing_rate_avg": 14.49
22 },
23 "provider_source": "garmin_wellness_sleep",
24 "provider_source_type": "activity",
25 "provider_slug": "garmin",
26 "source": {},
27 "stages": [
28 {
29 "start_at": "2025-03-13T19:30:00Z",
30 "end_at": "2025-03-13T19:46:00Z",
31 "duration": 960000,
32 "samples": {},
33 "stage": "light"
34 },
35 {
36 "start_at": "2025-03-13T19:46:00Z",
37 "end_at": "2025-03-13T19:58:00Z",
38 "duration": 720000,
39 "samples": {},
40 "stage": "deep"
41 },
42 {
43 "start_at": "2025-03-13T19:58:00Z",
44 "end_at": "2025-03-13T20:10:00Z",
45 "duration": 720000,
46 "samples": {},
47 "stage": "light"
48 },
49 {
50 "start_at": "2025-03-13T20:10:00Z",
51 "end_at": "2025-03-13T20:11:00Z",
52 "duration": 60000,
53 "samples": {},
54 "stage": "awake"
55 },
56 {
57 "start_at": "2025-03-13T20:11:00Z",
58 "end_at": "2025-03-13T20:25:00Z",
59 "duration": 840000,
60 "samples": {},
61 "stage": "light"
62 },
63 {
64 "start_at": "2025-03-13T20:25:00Z",
65 "end_at": "2025-03-13T21:03:00Z",
66 "duration": 2280000,
67 "samples": {},
68 "stage": "deep"
69 },
70 {
71 "start_at": "2025-03-13T21:03:00Z",
72 "end_at": "2025-03-13T21:10:00Z",
73 "duration": 420000,
74 "samples": {},
75 "stage": "light"
76 },
77 {
78 "start_at": "2025-03-13T21:10:00Z",
79 "end_at": "2025-03-13T21:55:00Z",
80 "duration": 2700000,
81 "samples": {},
82 "stage": "deep"
83 },
84 {
85 "start_at": "2025-03-13T21:55:00Z",
86 "end_at": "2025-03-13T22:23:00Z",
87 "duration": 1680000,
88 "samples": {},
89 "stage": "light"
90 },
91 {
92 "start_at": "2025-03-13T22:23:00Z",
93 "end_at": "2025-03-13T22:24:00Z",
94 "duration": 60000,
95 "samples": {},
96 "stage": "rem"
97 },
98 {
99 "start_at": "2025-03-13T22:24:00Z",
100 "end_at": "2025-03-13T22:25:00Z",
101 "duration": 60000,
102 "samples": {},
103 "stage": "light"
104 },
105 {
106 "start_at": "2025-03-13T22:25:00Z",
107 "end_at": "2025-03-13T23:03:00Z",
108 "duration": 2280000,
109 "samples": {},
110 "stage": "rem"
111 },
112 {
113 "start_at": "2025-03-13T23:03:00Z",
114 "end_at": "2025-03-14T00:27:00Z",
115 "duration": 5040000,
116 "samples": {},
117 "stage": "light"
118 },
119 {
120 "start_at": "2025-03-14T00:27:00Z",
121 "end_at": "2025-03-14T00:34:00Z",
122 "duration": 420000,
123 "samples": {},
124 "stage": "deep"
125 },
126 {
127 "start_at": "2025-03-14T00:34:00Z",
128 "end_at": "2025-03-14T00:47:00Z",
129 "duration": 780000,
130 "samples": {},
131 "stage": "light"
132 },
133 {
134 "start_at": "2025-03-14T00:47:00Z",
135 "end_at": "2025-03-14T01:05:00Z",
136 "duration": 1080000,
137 "samples": {},
138 "stage": "rem"
139 },
140 {
141 "start_at": "2025-03-14T01:05:00Z",
142 "end_at": "2025-03-14T01:08:00Z",
143 "duration": 180000,
144 "samples": {},
145 "stage": "light"
146 },
147 {
148 "start_at": "2025-03-14T01:08:00Z",
149 "end_at": "2025-03-14T01:11:00Z",
150 "duration": 180000,
151 "samples": {},
152 "stage": "rem"
153 },
154 {
155 "start_at": "2025-03-14T01:11:00Z",
156 "end_at": "2025-03-14T02:32:00Z",
157 "duration": 4860000,
158 "samples": {},
159 "stage": "light"
160 },
161 {
162 "start_at": "2025-03-14T02:32:00Z",
163 "end_at": "2025-03-14T02:42:00Z",
164 "duration": 600000,
165 "samples": {},
166 "stage": "rem"
167 },
168 {
169 "start_at": "2025-03-14T02:42:00Z",
170 "end_at": "2025-03-14T02:44:00Z",
171 "duration": 120000,
172 "samples": {},
173 "stage": "light"
174 },
175 {
176 "start_at": "2025-03-14T02:44:00Z",
177 "end_at": "2025-03-14T03:13:00Z",
178 "duration": 1740000,
179 "samples": {},
180 "stage": "rem"
181 },
182 {
183 "start_at": "2025-03-14T03:13:00Z",
184 "end_at": "2025-03-14T04:34:00Z",
185 "duration": 4860000,
186 "samples": {},
187 "stage": "light"
188 },
189 {
190 "start_at": "2025-03-14T04:34:00Z",
191 "end_at": "2025-03-14T04:37:00Z",
192 "duration": 180000,
193 "samples": {},
194 "stage": "rem"
195 },
196 {
197 "start_at": "2025-03-14T04:37:00Z",
198 "end_at": "2025-03-14T04:39:00Z",
199 "duration": 120000,
200 "samples": {},
201 "stage": "awake"
202 },
203 {
204 "start_at": "2025-03-14T04:39:00Z",
205 "end_at": "2025-03-14T05:31:00Z",
206 "duration": 3120000,
207 "samples": {},
208 "stage": "rem"
209 }
210 ],
211 "sleep_id": "dcde595e-0327-5909-b7e8-f1958c4796f5",
212 "score": 85
213 }
214 ]
215}