Skip to content

Commit 2239277

Browse files
akashaviatortimabbott
authored andcommitted
api: Implement POST /realm/profile_fields endpoint.
1 parent 30fa7c5 commit 2239277

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

zulip/zulip/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,19 @@ def get_realm_profile_fields(self) -> Dict[str, Any]:
919919
method='GET',
920920
)
921921

922+
def create_realm_profile_field(self, **request: Any) -> Dict[str, Any]:
923+
'''
924+
Example usage:
925+
926+
>>> client.create_realm_profile_field(name='Phone', hint='Contact No.', field_type=1)
927+
{'result': 'success', 'msg': '', 'id': 9}
928+
'''
929+
return self.call_endpoint(
930+
url='realm/profile_fields',
931+
method='POST',
932+
request=request,
933+
)
934+
922935
def get_server_settings(self) -> Dict[str, Any]:
923936
'''
924937
Example usage:

0 commit comments

Comments
 (0)